diff options
author | Robin Houston <robin@cpan.org> | 2001-03-14 04:16:10 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-03-14 04:59:54 +0000 |
commit | a4f3a277dab3a9e285418160103305f0e5819cf9 (patch) | |
tree | d56fdc8f4967c6c6df5c1cf1f6d8970dab68ed78 /pp_ctl.c | |
parent | dae2d13f8edc3ee84694ec70a87a495ba78e08f2 (diff) | |
download | perl-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.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 */ |