develooper Front page | perl.perl5.porters | Postings from May 2010

[perl #8955] missing warning

Thread Previous
Alexandr Ciornii via RT
May 11, 2010 13:33
[perl #8955] missing warning
Message ID:
Same result on 5.12.0.

On Thu Apr 18 15:12:26 2002, wrote:
> Why does the first @{$u} cause a warning (with -w) but the second one
> doesn't?  
> $u = undef;
> @w = @{$u};
> for (@{$u}) {};
> Use of uninitialized value in array dereference at - line 3.
> Seen in perl-current (rc1 to be) and all the way back to 5.005_03,
> although the warning may vary.  
> I started tracking this down (but the email client crashed with an
> hour worth of notes in it.)  I think it's got something to do with the
> second pp_rv2av op having the OPf_REF flag set, but the first one
> doesn't, probably because of what the for is going to do with it.  I
> tried to track down where it got set, but it was a twisty twisty maze.

Alexandr Ciornii,

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About