This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix my $x = 3; $x = length(undef);.
authorBen Morrow <ben@morrow.me.uk>
Fri, 20 Aug 2010 17:35:58 +0000 (18:35 +0100)
committerJan Dubois <jand@activestate.com>
Fri, 20 Aug 2010 22:57:11 +0000 (15:57 -0700)
commitd88e091f660036722622a815efa9ef3779605ea6
tree653a33d8dc75118b4598d1f9190659693f994f6b
parentecf9cdab78811498b3ffea48cfdfb09f678050d2
Fix my $x = 3; $x = length(undef);.

Assignment of length() to a lexical is optimized by passing the
assigned-to variable as TARG, avoiding a pp_padsv and pp_sassign.
9f621b which changed length(undef) to return undef didn't take this into
account, and used SETs (which doesn't set TARG), so the code above left
$x == 3.
pp.c
t/op/length.t