Skip Menu |

This queue is for tickets about the Parse-RecDescent CPAN distribution.

Report information
The Basics
Id: 54457
Status: resolved
Priority: 0/
Queue: Parse-RecDescent

People
Owner: Nobody in particular
Requestors: dstahlke [...] gmail.com
Cc:
AdminCc:

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



Subject: $1 is uninitialized at line 2367
In the following code (which starts at line 2364 of RecDescent.pm) elsif ($grammar =~ m/$LITERAL/gco) { ($code = $1) =~ s/\\\\/\\/g; _parse("a literal terminal", $aftererror,$line,$1); $item = new Parse::RecDescent::Literal($code,$lookahead,$line); $prod and $prod->additem($item) or _no_rule("literal terminal",$line,"'$1'"); } the $1 variable appears to be uninitialized when _parse is called. This causes an uninitialized value warning at line 3087 in the _parse function. I am using perl 5.8.8 on Centos 5. The warning happens when RecDescent is called by Google::ProtocolBuffers, apparently only when running under mod_perl.
Subject: Re: [rt.cpan.org #54457] $1 is uninitialized at line 2367
Date: Wed, 10 Feb 2010 10:23:12 +1100
To: bug-Parse-RecDescent [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
On 10 February 2010 10:16, Dan Stahlke via RT <bug-Parse-RecDescent@rt.cpan.org> wrote: Show quoted text
> Tue Feb 09 18:16:44 2010: Request 54457 was acted upon. > Transaction: Ticket created by dstahlke@gmail.com >       Queue: Parse-RecDescent >     Subject: $1 is uninitialized at line 2367 >   Broken in: 1.963 >    Severity: (no value) >       Owner: Nobody >  Requestors: dstahlke@gmail.com >      Status: new >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=54457 > > > > In the following code (which starts at line 2364 of RecDescent.pm) > >        elsif ($grammar =~ m/$LITERAL/gco) >        { >            ($code = $1) =~ s/\\\\/\\/g; >            _parse("a literal terminal", $aftererror,$line,$1); >            $item = new Parse::RecDescent::Literal($code,$lookahead,$line); >            $prod and $prod->additem($item) >                  or  _no_rule("literal terminal",$line,"'$1'"); >        } > > the $1 variable appears to be uninitialized when _parse is called.  This > causes an uninitialized value warning at line 3087 in the _parse function. > > I am using perl 5.8.8 on Centos 5.  The warning happens when RecDescent > is called by Google::ProtocolBuffers, apparently only when running under > mod_perl. >
Thanks for the report. Fixed for the next release. In the meantime the patch is to replace the current block with: elsif ($grammar =~ m/$LITERAL/gco) { my $literal = $1; ($code = $literal) =~ s/\\\\/\\/g; _parse("a literal terminal", $aftererror,$line,$literal); $item = new Parse::RecDescent::Literal($code,$lookahead,$line); $prod and $prod->additem($item) or _no_rule("literal terminal",$line,"'$literal'"); } Damian the following: Damian
Subject: Re: [rt.cpan.org #54457] $1 is uninitialized at line 2367
Date: Tue, 09 Feb 2010 14:25:26 -0900
To: bug-Parse-RecDescent [...] rt.cpan.org
From: Dan Stahlke <dan [...] gina.alaska.edu>
That was the fastest bug fix I have ever seen in my life. Thanks! On 02/09/10 14:24, damian@conway.org via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=54457> > > On 10 February 2010 10:16, Dan Stahlke via RT > <bug-Parse-RecDescent@rt.cpan.org> wrote: >
>> Tue Feb 09 18:16:44 2010: Request 54457 was acted upon. >> Transaction: Ticket created by dstahlke@gmail.com >> Queue: Parse-RecDescent >> Subject: $1 is uninitialized at line 2367 >> Broken in: 1.963 >> Severity: (no value) >> Owner: Nobody >> Requestors: dstahlke@gmail.com >> Status: new >> Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=54457> >> >> >> In the following code (which starts at line 2364 of RecDescent.pm) >> >> elsif ($grammar =~ m/$LITERAL/gco) >> { >> ($code = $1) =~ s/\\\\/\\/g; >> _parse("a literal terminal", $aftererror,$line,$1); >> $item = new Parse::RecDescent::Literal($code,$lookahead,$line); >> $prod and $prod->additem($item) >> or _no_rule("literal terminal",$line,"'$1'"); >> } >> >> the $1 variable appears to be uninitialized when _parse is called. This >> causes an uninitialized value warning at line 3087 in the _parse function. >> >> I am using perl 5.8.8 on Centos 5. The warning happens when RecDescent >> is called by Google::ProtocolBuffers, apparently only when running under >> mod_perl. >> >>
> Thanks for the report. Fixed for the next release. > > In the meantime the patch is to replace the current block with: > > elsif ($grammar =~ m/$LITERAL/gco) > { > my $literal = $1; > ($code = $literal) =~ s/\\\\/\\/g; > _parse("a literal terminal", $aftererror,$line,$literal); > $item = new Parse::RecDescent::Literal($code,$lookahead,$line); > $prod and $prod->additem($item) > or _no_rule("literal terminal",$line,"'$literal'"); > } > > Damian > the following: > > > > Damian > >
This issues appears to have been resolved by a previous release according to the ticket history.