diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-07-21 14:02:25 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-07-21 14:02:25 +0200 |
commit | bb74b0ee4e732d7f05e2d9e9690a7ada65f6039e (patch) | |
tree | 345d063eda48c9801d89d78628cbfef1fdbb259c /pp_ctl.c | |
parent | de6375e332702d303851040d7f316f395af6be8e (diff) | |
download | perl-bb74b0ee4e732d7f05e2d9e9690a7ada65f6039e.tar.gz |
Simplify the code that sets $_ in given()
$_ is guaranteed to be lexical here, because the parser did an allocmy
when parsing the given() statement.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -3911,13 +3911,7 @@ PP(pp_entergiven) ENTER; SAVETMPS; - if (PL_op->op_targ == 0) { - SV ** const defsv_p = &GvSV(PL_defgv); - *defsv_p = newSVsv(POPs); - SAVECLEARSV(*defsv_p); - } - else - sv_setsv(PAD_SV(PL_op->op_targ), POPs); + sv_setsv(PAD_SV(PL_op->op_targ), POPs); PUSHBLOCK(cx, CXt_GIVEN, SP); PUSHGIVEN(cx); |