diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-09-17 00:27:14 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-09-17 00:27:14 -0700 |
commit | 426a09cda0fa65ac09901aeb0de4b8be77b13ee8 (patch) | |
tree | 94362e05755f94c318e6fe54044233f705a9a129 /pp_ctl.c | |
parent | e8ed61c58cadd53d80a36d3e3a3fa0abdb90834d (diff) | |
download | perl-426a09cda0fa65ac09901aeb0de4b8be77b13ee8.tar.gz |
Fix recursion warning for ‘no warnings; goto &sub’
Commit 309aab3a made goto &foo make the lexical hints of the caller of
the sub containing the goto visible when foo is called. CORE subs
need this to function properly when ‘goneto’. But in that commit I
put the PL_curcop assignment before the recursion check, causing the
warning settings of the caller to be used, instead of those at the
goto. This commit moves the PL_curcop further down in pp_goto.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2908,7 +2908,6 @@ PP(pp_goto) } cx->blk_sub.cv = cv; cx->blk_sub.olddepth = CvDEPTH(cv); - PL_curcop = cx->blk_oldcop; CvDEPTH(cv)++; if (CvDEPTH(cv) < 2) @@ -2918,6 +2917,7 @@ PP(pp_goto) sub_crush_depth(cv); pad_push(padlist, CvDEPTH(cv)); } + PL_curcop = cx->blk_oldcop; SAVECOMPPAD(); PAD_SET_CUR_NOSAVE(padlist, CvDEPTH(cv)); if (CxHASARGS(cx)) |