diff options
author | Robin Houston <robin@cpan.org> | 2001-03-14 01:52:51 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-03-14 02:41:54 +0000 |
commit | 9c5794fe8bd5803990d11472f5ebcdba0e7877cc (patch) | |
tree | ac1ac7cdea435dacda05c87fd598d0e5bdfb7d07 /pp_ctl.c | |
parent | 36c66720946952b050ad9db88444230a58b3c69d (diff) | |
download | perl-9c5794fe8bd5803990d11472f5ebcdba0e7877cc.tar.gz |
Re: [ID 20010309.004] my-variables lose values while goto'ing within a for(;;)-loop
Message-ID: <20010314015251.B16112@puffinry.freeserve.co.uk>
Fix for 2000313.004.
p4raw-id: //depot/perl@9140
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2463,8 +2463,11 @@ PP(pp_goto) cx = &cxstack[ix]; switch (CxTYPE(cx)) { case CXt_EVAL: - gotoprobe = PL_eval_root; /* XXX not good for nested eval */ - break; + if (CxREALEVAL(cx)) { + gotoprobe = PL_eval_root; /* XXX not good for nested eval */ + break; + } + /* else fall through */ case CXt_LOOP: gotoprobe = cx->blk_oldcop->op_sibling; break; @@ -3506,7 +3509,6 @@ PP(pp_entertry) push_return(cLOGOP->op_other->op_next); PUSHBLOCK(cx, (CXt_EVAL|CXp_TRYBLOCK), SP); PUSHEVAL(cx, 0, 0); - PL_eval_root = PL_op; /* Only needed so that goto works right. */ PL_in_eval = EVAL_INEVAL; sv_setpv(ERRSV,""); |