Subject: | Error 'Can't use string ("") as a symbol ref...' when using pod2text |
When invoking pod2text, the script fails with the error:
Can't use string ("") as a symbol ref while "strict refs" in use at /usr/lib/perl5/5.8.6/Pod/Text.pm line 248.
It appears that on line 105 in pod2text(.PL), a call has been made to the "parse_file" method. This method only accepts one argument. In this case we want the two-argument alternative method "parse_from_file".
Patch below.
--- pod2text.PL.old 2004-06-09 06:55:50.000000000 +0200
+++ pod2text.PL 2006-01-05 00:07:00.000000000 +0200
@@ -102,7 +102,7 @@
do {
my $parser = $formatter->new (%options);
my ($input, $output) = splice (@ARGV, 0, 2);
- $parser->parse_file ($input, $output);
+ $parser->parse_from_file ($input, $output);
undef $parser;
} while (@ARGV);