This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Get foreach \&foo working
authorFather Chrysostomos <sprout@cpan.org>
Fri, 3 Oct 2014 19:29:35 +0000 (12:29 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 11 Oct 2014 07:10:16 +0000 (00:10 -0700)
commit19abb1eacc7e9cf1067062e2bf447ba3c08031ec
tree1ff2e5cdd391d5483a4645f2b9b306ad9d009734
parentd39c26a657753cddffc8cb3dbd2aaa929b2c78fe
Get foreach \&foo working

Previously these would crash.  Usually, &foo is wrapped in an entersub
op which gets converted to rv2cv when refgen applies lvalue context.
In foreach \&foo, there is no need for us to go the entersub route;
rather we pass the original rv2cv op directly to refgen without the
entersub wrapping.  So the resulting op tree is different.  S_lvref
was not expecting this alternate op tree.
op.c