Skip Menu |
 

This queue is for tickets about the Pod-Usage CPAN distribution.

Report information
The Basics
Id: 115847
Status: resolved
Worked: 20 min
Priority: 0/
Queue: Pod-Usage

People
Owner: Marek.Rouchal [...] gmx.net
Requestors: MPERRY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.69
Fixed in: 1.70



Subject: pod2usage exits with error when using "-verbose 3" with STDIN
Download (untitled) / with headers
text/plain 339b
When I pipe POD to pod2usage and use the "-verbose 3" option, pod2usage produces no output and exists with an error code of 1. This fails to work: cat /home/mperry/perl5/perlbrew/perls/perl-5.22.0/bin/pod2usage | pod2usage -verbose 3 This works correctly: pod2usage -verbose 3 /home/mperry/perl5/perlbrew/perls/perl-5.22.0/bin/pod2usage
Sorry for the long wait. There are two parts in this ticket: 1. exit status With Pod::Usage 1.69, the exit status is correct - according to the documentation. If you want a specific exit status of pod2usage, specify it with -exit on the command line. 2. formatting It seems that more recent versions of Pod::Simple (the underlying POD parser infrastructure) does not parse the '-' filename correctly. I made a change, and that fixes the problem - to be released soon as Pod::Usage 1.70. Caveat: when pod2usage is reading from STDIN, it will format the output with Pod::Text; this is because perldoc, which is normally invoked when -verbose >=2, cannot read from STDIN (because the pager will need STDIN). So if you want all the nice highlighting of perldoc AND need to pipe the input into pod2usage, then you will have to use (adding also exit status 0 here): cat myfile.pod | pod2usage -verbose 2 -formatter Pod::Text::Termcap -exit 0 Please let me know here whether this answers your questions. Stay tuned for the release of Pod::Usage 1.70. -Marek
Closing as fixed in Pod-Usage-1.70. Thank you for your patience. -Marek


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.