Skip Menu |

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

Report information
The Basics
Id: 66614
Status: resolved
Priority: 0/
Queue: Pod-Parser

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

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



Subject: parse of no final newline vs perl -w
Date: Tue, 15 Mar 2011 11:38:36 +1100
To: bug-Pod-Parser [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
With Pod::Parser 1.37 and recent debian perl 5.10.1 running foo.pl below as perl -w foo.pl gives warnings Use of uninitialized value in concatenation (.) or string at /usr/share/perl/5.10/Pod/InputObjects.pm line 327, <GEN0> line 1. Use of uninitialized value in concatenation (.) or string at /usr/share/perl/5.10/Pod/InputObjects.pm line 327, <GEN0> line 1. Use of uninitialized value $text in pattern match (m//) at /usr/share/perl/5.10/Pod/Parser.pm line 1019, <GEN0> line 1. It seems that if the input ends with a command and no final "\n" newline then there's some undefs. It'd be good if input like that was clean to "perl -w". The first two warnings might be only from not having actual subclass code for text output, but I struck the last one, $myData{_WHITESPACE} = $text =~ /^[^\S\r\n]+\Z/m ? 1 : 0; in a sensible subclass. It seems to throw a warning outside anything the subclass could easily control.
use strict; use Pod::Parser; use IO::String; print Pod::Parser->VERSION,"\n"; my $fh = IO::String->new("=head1"); my $p = Pod::Parser->new; $p->parse_from_filehandle ($fh);
I'm not sure whether I understood all you've written, but I fixed the warning messages in the foo.pl script, by making sure that there are no undefined values in the Pod::Paragraph object. Implemented in 1.50, to be released soon. -Marek