develooper Front page | perl.perl5.porters | Postings from June 2008

Re: incorrect variable reported in uninitialized value warning

Thread Previous
From:
Dave Mitchell
Date:
June 25, 2008 12:54
Subject:
Re: incorrect variable reported in uninitialized value warning
Message ID:
20080625195349.GO12186@iabyn.com
On Tue, Jun 24, 2008 at 11:04:56AM +0100, Nicholas Clark wrote:
> On Sun, Jun 22, 2008 at 08:05:51PM +0100, Dave Mitchell wrote:
> > On Sun, Jun 22, 2008 at 04:52:37AM +0300, Yuval Kogman wrote:
> > > perl -we 'my $f = "does_not_exist"; warn -e $f'
> > > Use of uninitialized value $f in warn at -e line 1.
> > > Warning: something's wrong at -e line 1.
> > > 
> > > $f is not the uninitialized value, but the return from -e
> > 
> > Whoops!
> > 
> > Fixed by change #34077.
> 
> There's (at least) one obscure one left:
> 
> $ ./perl -Ilib -we '$a = "NaN"; print $a <=> 1'
> Use of uninitialized value $a in print at -e line 1.

I found a few more too. Fixed by #34084.

(I audited pp*.c for RETPUSHUNDEF, but forgot to look for explicit
PUSHs(&PL_sv_undef) etc too).

-- 
Monto Blanco... scorchio!

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About