This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix recursion warning for ‘no warnings; goto &sub’
authorFather Chrysostomos <sprout@cpan.org>
Sat, 17 Sep 2011 07:27:14 +0000 (00:27 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 17 Sep 2011 07:27:14 +0000 (00:27 -0700)
commit426a09cda0fa65ac09901aeb0de4b8be77b13ee8
tree94362e05755f94c318e6fe54044233f705a9a129
parente8ed61c58cadd53d80a36d3e3a3fa0abdb90834d
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.
pp_ctl.c
t/op/goto.t