summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
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 */