projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de6375e
)
Simplify the code that sets $_ in given()
author
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Tue, 21 Jul 2009 12:02:25 +0000
(14:02 +0200)
committer
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Tue, 21 Jul 2009 12:02:25 +0000
(14:02 +0200)
$_ is guaranteed to be lexical here, because the parser did an allocmy
when parsing the given() statement.
pp_ctl.c
patch
|
blob
|
history
diff --git
a/pp_ctl.c
b/pp_ctl.c
index
eab9624
..
ebfcf74
100644
(file)
--- a/
pp_ctl.c
+++ b/
pp_ctl.c
@@
-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);