Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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.
Description of problem:
If I try to use the Pod::Man "parse_file" function, I get failures. Even the simplest invocation, directly from the man page, gives uninitialized value and strict refs errors.
Version-Release number of selected component (if applicable):
$ rpm -qf /usr/share/perl5/Pod/Man.pm
perl-5.10.1-119.el6_1.1.x86_64
The documentation (man Pod::Man) says:
SYNOPSIS
use Pod::Man;
my $parser = Pod::Man->new (release => $VERSION, section => 8);
# Read POD from STDIN and write to STDOUT.
$parser->parse_file (\*STDIN);
...
The standard Pod::Simple method parse_file() takes one argument naming
the POD file to read from. By default, the output is sent to "STDOUT",
but this can be changed with the output_fd() method.
How reproducible:
100%
Steps to Reproduce:
Run this at a shell prompt:
$ perl -e 'use Pod::Man; my $p = Pod::Man->new(); $p->parse_file($ARGV[0]);' /usr/share/perl5/Pod/Man.pm
OR:
$ perl -e 'use Pod::Man; my $p = Pod::Man->new(); $p->parse_file(\*STDIN);' < /usr/share/perl5/Pod/Man.pm
Actual results:
$ perl -e 'use Pod::Man; my $p = Pod::Man->new(); $p->parse_file($ARGV[0]);' /usr/share/perl5/Pod/Man.pm
Can't use string ("") as a symbol ref while "strict refs" in use at /usr/share/perl5/Pod/Man.pm line 722.
Or if you add use strict:
$ perl -we 'use strict; use Pod::Man; my $p = Pod::Man->new(); $p->parse_file($ARGV[0]);' /usr/share/perl5/Pod/Man.pm
Use of uninitialized value in ref-to-glob cast at /usr/share/perl5/Pod/Man.pm line 722.
Can't use string ("") as a symbol ref while "strict refs" in use at /usr/share/perl5/Pod/Man.pm line 722.
Expected results:
I expect the output to go to STDOUT in nroff format.
Additional info:
The parse_from_file() method does appear to work correctly.
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().
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
Description of problem: If I try to use the Pod::Man "parse_file" function, I get failures. Even the simplest invocation, directly from the man page, gives uninitialized value and strict refs errors. Version-Release number of selected component (if applicable): $ rpm -qf /usr/share/perl5/Pod/Man.pm perl-5.10.1-119.el6_1.1.x86_64 The documentation (man Pod::Man) says: SYNOPSIS use Pod::Man; my $parser = Pod::Man->new (release => $VERSION, section => 8); # Read POD from STDIN and write to STDOUT. $parser->parse_file (\*STDIN); ... The standard Pod::Simple method parse_file() takes one argument naming the POD file to read from. By default, the output is sent to "STDOUT", but this can be changed with the output_fd() method. How reproducible: 100% Steps to Reproduce: Run this at a shell prompt: $ perl -e 'use Pod::Man; my $p = Pod::Man->new(); $p->parse_file($ARGV[0]);' /usr/share/perl5/Pod/Man.pm OR: $ perl -e 'use Pod::Man; my $p = Pod::Man->new(); $p->parse_file(\*STDIN);' < /usr/share/perl5/Pod/Man.pm Actual results: $ perl -e 'use Pod::Man; my $p = Pod::Man->new(); $p->parse_file($ARGV[0]);' /usr/share/perl5/Pod/Man.pm Can't use string ("") as a symbol ref while "strict refs" in use at /usr/share/perl5/Pod/Man.pm line 722. Or if you add use strict: $ perl -we 'use strict; use Pod::Man; my $p = Pod::Man->new(); $p->parse_file($ARGV[0]);' /usr/share/perl5/Pod/Man.pm Use of uninitialized value in ref-to-glob cast at /usr/share/perl5/Pod/Man.pm line 722. Can't use string ("") as a symbol ref while "strict refs" in use at /usr/share/perl5/Pod/Man.pm line 722. Expected results: I expect the output to go to STDOUT in nroff format. Additional info: The parse_from_file() method does appear to work correctly.