summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 658a89042a..b6c11da22b 100644
--- a/pp.c
+++ b/pp.c
@@ -467,7 +467,7 @@ S_refto(pTHX_ SV *sv)
SvTEMP_off(sv);
(void)SvREFCNT_inc(sv);
}
- else if (SvPADTMP(sv))
+ else if (SvPADTMP(sv) && !(isGV(sv) && GvIN_PAD(sv)))
sv = newSVsv(sv);
else {
SvTEMP_off(sv);