This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Stop tell($glob_copy) from clearing PL_last_in_gv
[perl5.git] / pp.c
diff --git a/pp.c b/pp.c
index 3c290dd..c9d72b8 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -232,7 +232,7 @@ S_rv2gv(pTHX_ SV *sv, const bool vivify_sv, const bool strict,
            SvFAKE_off(sv);
        }
     }
-    if (SvFAKE(sv)) {
+    if (SvFAKE(sv) && !(PL_op->op_private & OPpALLOW_FAKE)) {
        SV *newsv = sv_newmortal();
        sv_setsv_flags(newsv, sv, 0);
        SvFAKE_off(newsv);