diff options
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -2802,7 +2802,9 @@ PP(pp_leavesublv) sv_2mortal(*MARK); } else - *MARK = TOPs; + *MARK = SvTEMP(TOPs) + ? TOPs + : sv_2mortal(SvREFCNT_inc_simple_NN(TOPs)); } else { MEXTEND(MARK, 0); @@ -2810,6 +2812,13 @@ PP(pp_leavesublv) } SP = MARK; } + else if (gimme == G_ARRAY) { + rvalue_array: + for (MARK = newsp + 1; MARK <= SP; MARK++) { + if (!SvTEMP(*MARK)) + *MARK = sv_2mortal(SvREFCNT_inc_simple_NN(*MARK)); + } + } } if (CxLVAL(cx) & OPpENTERSUB_DEREF) { @@ -2829,7 +2838,6 @@ PP(pp_leavesublv) } } - rvalue_array: PUTBACK; LEAVE; |