summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorRobin Houston <robin@cpan.org>2001-03-14 04:16:10 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-14 04:59:54 +0000
commita4f3a277dab3a9e285418160103305f0e5819cf9 (patch)
treed56fdc8f4967c6c6df5c1cf1f6d8970dab68ed78 /pp_ctl.c
parentdae2d13f8edc3ee84694ec70a87a495ba78e08f2 (diff)
downloadperl-a4f3a277dab3a9e285418160103305f0e5819cf9.tar.gz
PATCH: make goto work in nested eval ""
Message-ID: <20010314041610.A16307@puffinry.freeserve.co.uk> p4raw-id: //depot/perl@9147
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 99e3ff415c..93b89b14a7 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2455,6 +2455,7 @@ PP(pp_goto)
if (label && *label) {
OP *gotoprobe = 0;
bool leaving_eval = FALSE;
+ PERL_CONTEXT *last_eval_cx = 0;
/* find label */
@@ -2466,7 +2467,10 @@ PP(pp_goto)
case CXt_EVAL:
leaving_eval = TRUE;
if (CxREALEVAL(cx)) {
- gotoprobe = PL_eval_root; /* XXX not good for nested eval */
+ gotoprobe = (last_eval_cx ?
+ last_eval_cx->blk_eval.old_eval_root :
+ PL_eval_root);
+ last_eval_cx = cx;
break;
}
/* else fall through */