This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix (*glob) = ()
[perl5.git] / sv.c
diff --git a/sv.c b/sv.c
index 0382e96..e3026f7 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -4834,8 +4834,8 @@ Perl_sv_set_undef(pTHX_ SV *sv)
     if (isGV_with_GP(sv))
         Perl_ck_warner(aTHX_ packWARN(WARN_MISC),
                        "Undefined value assigned to typeglob");
-
-    SvOK_off(sv);
+    else
+        SvOK_off(sv);
 }