summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-08-19 17:39:45 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-08-20 12:50:00 -0700
commit25451ceff7e8f05c501ecc72a1b3536005f391f7 (patch)
tree0aacb594ff7bd6454c9dbc8b844969cfb84fdf0b /pad.c
parent7e8c6c4cac89df95535a8354d57396d3144876b8 (diff)
downloadperl-25451ceff7e8f05c501ecc72a1b3536005f391f7.tar.gz
Stop recursion from losing lex fh names
sub r { r($_[0]-1) if $_[0]; open my $fh, "/dev/null"; print "$_[0] $$fh\n" } r(5); __END__ Output: 0 *main:: 1 *main:: 2 *main:: 3 *main:: 4 *main:: 5 *main::$fh The largest number represents the outermost call. The handle name was being allocated as a target (a scratch variable used by various operators to return values). Targets are not shared between recursion levels. This commit tells pad_alloc to treat it like a constant, so it is shared.
Diffstat (limited to 'pad.c')
0 files changed, 0 insertions, 0 deletions