Bug 819042
Summary: | Trying to use the Pod::Man "parse_file" function in Perl results in errors | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Paul Smith <pds> | ||||||||
Component: | perl | Assignee: | Petr Pisar <ppisar> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Martin Kyral <mkyral> | ||||||||
Severity: | medium | Docs Contact: | Martin Kyral <mkyral> | ||||||||
Priority: | medium | ||||||||||
Version: | 6.2 | CC: | lnovich, mkyral, ppisar, psabata | ||||||||
Target Milestone: | rc | Keywords: | Patch | ||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | perl-5.10.1-133.el6 | Doc Type: | Bug Fix | ||||||||
Doc Text: |
Cause:
Using Pod::Man's method parse_file() without setting
output handle explicitly.
Consequence:
The method call fails on type error instead of printing
POD documentation formatted by roff to standard output.
Fix:
Pod::Man and Pod::Text parse_file() methods have been
overloaded to use standard output handle by default.
Result:
Pod::Man and Pod::Text parse_file() method can be used
even without setting output handle explicitly.
|
Story Points: | --- | ||||||||
Clone Of: | |||||||||||
: | 826872 (view as bug list) | Environment: | |||||||||
Last Closed: | 2013-11-21 04:40:27 UTC | Type: | Bug | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Bug Depends On: | |||||||||||
Bug Blocks: | 947775 | ||||||||||
Attachments: |
|
Description
Paul Smith
2012-05-04 16:30:06 UTC
Created attachment 582550 [details]
Reproducer
This seems like a misunderstanding between Pod::Simple and Pod::Man API. (Pod::Man is subclass of Pod::Simple). While Pod::Simple::parse_from_file() sets output to *STDOUT by default, Pod::Simple::parse_file() does not. Some other Pod::* formatters handle the output on their own. I raised an question to Pod::Simple developers. As a workaround, you can set the output manually by calling $p->output_fh(*STDOUT) before parse_file(). Pod::Man developer decided do the fix in podlators-2.4.1 (http://cpansearch.perl.org/src/RRA/podlators-2.4.1/ChangeLog). Created attachment 612816 [details]
Fix from upstream
Created attachment 757553 [details]
Reproducer
It's better to check Pod::Text too as it suffers from the same problem and it's changed by the patch either.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1534.html |