This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #113812] Always use find_runcv when cloning a sub
authorFather Chrysostomos <sprout@cpan.org>
Fri, 29 Jun 2012 06:12:23 +0000 (23:12 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 29 Jun 2012 07:51:10 +0000 (00:51 -0700)
commit5dff782da0fedb2c813f8a63e1a8df588bb6159e
tree172e2bbb995baf24a588a7969369310c20433d1c
parentc5fb998ef860f7f66b2a91fa441d43fc2168dda0
[perl #113812] Always use find_runcv when cloning a sub

A closure prototype’s CvOUTSIDE pointer might have been modified if
its containing sub is freed first.  When a sub is cloned, the enclos-
ing sub is always the currently-running sub (not so for formats).

So this commit makes subs always use find_runcv, the way they did
before 71f882da828.

So the closure logic which was needed for formats is now moved into an
else branch that is used only for them.
pad.c
t/op/closure.t