This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make it possible to have read-only glob copies
[perl5.git] / sv.c
diff --git a/sv.c b/sv.c
index 557db93..19a8068 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -4766,7 +4766,7 @@ Perl_sv_force_normal_flags(pTHX_ register SV *const sv, const U32 flags)
     }
 #else
     if (SvREADONLY(sv)) {
-       if (SvFAKE(sv)) {
+       if (SvFAKE(sv) && !isGV_with_GP(sv)) {
            const char * const pvx = SvPVX_const(sv);
            const STRLEN len = SvCUR(sv);
            SvFAKE_off(sv);