This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Scalar keys assignment through lvalue subs
authorFather Chrysostomos <sprout@cpan.org>
Fri, 10 Jun 2011 04:24:01 +0000 (21:24 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 10 Jun 2011 04:24:01 +0000 (21:24 -0700)
commitfad4a2e4a4e2d22bf0b29de7f20808f0a01e79a2
treef6b51a40b445bc5fa5ddd5159e0b5422935eba82
parent6a8709a60c31d74562d0cb240c7a34a5768b3a94
Scalar keys assignment through lvalue subs

This used not to work:

   sub foo :lvalue { keys %wallet }
   foo = 37;

Now it does. It was just a matter of following the right code path in
op_lvalue when the parent op is a leavesublv instead of a sassign.
op.c
pod/perldelta.pod
t/op/sub_lval.t