summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorStephen McCamant <smcc@mit.edu>2001-01-10 13:36:51 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2001-01-12 16:09:09 +0000
commit78f9721bf0dc33981bedf125bcfa5c0c42b69eba (patch)
tree02808081953b524eb6a13bcb5ddba0e2a6e4666f /doop.c
parentb78ba3cc234763c7deff02f1d759b76b3a9ce5d1 (diff)
downloadperl-78f9721bf0dc33981bedf125bcfa5c0c42b69eba.tar.gz
Consolidated lvalue sub changes
Message-ID: <14941.16925.736415.785818@soda.csua.berkeley.edu> p4raw-id: //depot/perl@8417
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/doop.c b/doop.c
index 526409c16c..1495953955 100644
--- a/doop.c
+++ b/doop.c
@@ -1206,7 +1206,7 @@ Perl_do_kv(pTHX)
dokeys = dovalues = TRUE;
if (!hv) {
- if (PL_op->op_flags & OPf_MOD) { /* lvalue */
+ if (PL_op->op_flags & OPf_MOD || LVRET) { /* lvalue */
dTARGET; /* make sure to clear its target here */
if (SvTYPE(TARG) == SVt_PVLV)
LvTARG(TARG) = Nullsv;
@@ -1225,7 +1225,7 @@ Perl_do_kv(pTHX)
IV i;
dTARGET;
- if (PL_op->op_flags & OPf_MOD) { /* lvalue */
+ if (PL_op->op_flags & OPf_MOD || LVRET) { /* lvalue */
if (SvTYPE(TARG) < SVt_PVLV) {
sv_upgrade(TARG, SVt_PVLV);
sv_magic(TARG, Nullsv, 'k', Nullch, 0);