summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pp.c b/pp.c
index 297b532058..9a74280f69 100644
--- a/pp.c
+++ b/pp.c
@@ -218,15 +218,15 @@ PP(pp_rv2gv)
if (sv) SvFAKE_off(sv);
}
}
- if (PL_op->op_private & OPpLVAL_INTRO)
- save_gp(MUTABLE_GV(sv), !(PL_op->op_flags & OPf_SPECIAL));
if (sv && SvFAKE(sv)) {
SV *newsv = sv_newmortal();
sv_setsv_flags(newsv, sv, 0);
SvFAKE_off(newsv);
- SETs(newsv);
+ sv = newsv;
}
- else SETs(sv);
+ if (PL_op->op_private & OPpLVAL_INTRO)
+ save_gp(MUTABLE_GV(sv), !(PL_op->op_flags & OPf_SPECIAL));
+ SETs(sv);
RETURN;
}