This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use the same outside logic for mysubs and formats
By using find_runcv_where both for formats and my subs nested in inner
clonable subs, we can simplify the code.
It happens to make this work ($x is visible):
use 5.01;
sub not_lexical8 {
my sub foo;
foo();
sub not_lexical9 {
my sub bar {
my $x = 'khaki car keys for the khaki car';
not_lexical8();
sub foo { warn $x }
}
bar()
}
}
not_lexical9();
This is definitely iffy code, but if making it work makes the imple-
mentation simpler, so why not?