summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorAdrian M. Enache <enache@rdslink.ro>2003-02-08 23:05:14 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-02-14 22:23:56 +0000
commit33d34e4c563f3e0b3627fb43d2e2a2ef278a273a (patch)
tree453e74c03e24650bdd8b9db7a310b4c14d558560 /pp_ctl.c
parent97605c5162d70498fbc6c6addf1e17e758cec438 (diff)
downloadperl-33d34e4c563f3e0b3627fb43d2e2a2ef278a273a.tar.gz
Re: trying to fix #20154, #20357
Message-ID: <20030208190514.GA866@ratsnest.hole> (fixes #19061 as well) p4raw-id: //depot/perl@18703
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 73d136539d..5699b7cca8 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2015,6 +2015,7 @@ S_dofindlabel(pTHX_ OP *o, char *label, OP **opstack, OP **oplimit)
if (o->op_type == OP_LEAVE ||
o->op_type == OP_SCOPE ||
o->op_type == OP_LEAVELOOP ||
+ o->op_type == OP_LEAVESUB ||
o->op_type == OP_LEAVETRY)
{
*ops++ = cUNOPo->op_first;
@@ -2273,6 +2274,7 @@ PP(pp_goto)
if (label && *label) {
OP *gotoprobe = 0;
bool leaving_eval = FALSE;
+ bool in_block = FALSE;
PERL_CONTEXT *last_eval_cx = 0;
/* find label */
@@ -2298,9 +2300,10 @@ PP(pp_goto)
case CXt_SUBST:
continue;
case CXt_BLOCK:
- if (ix)
+ if (ix) {
gotoprobe = cx->blk_oldcop->op_sibling;
- else
+ in_block = TRUE;
+ } else
gotoprobe = PL_main_root;
break;
case CXt_SUB:
@@ -2357,7 +2360,8 @@ PP(pp_goto)
if (*enterops && enterops[1]) {
OP *oldop = PL_op;
- for (ix = 1; enterops[ix]; ix++) {
+ ix = enterops[1]->op_type == OP_ENTER && in_block ? 2 : 1;
+ for (; enterops[ix]; ix++) {
PL_op = enterops[ix];
/* Eventually we may want to stack the needed arguments
* for each op. For now, we punt on the hard ones. */