This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
"use overload fallback => 0" should enable overloading [perl #113010]
[perl5.git] / gv.c
diff --git a/gv.c b/gv.c
index c4089cd..8251c29 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -2274,10 +2274,16 @@ Perl_Gv_AMupdate(pTHX_ HV *stash, bool destructing)
        NOOP;   /* Equivalent to !SvTRUE and !SvOK  */
     }
 #endif
-    else if (SvTRUE(sv))
+    else if (SvTRUE(sv)) {
        amt.fallback=AMGfallYES;
-    else if (SvOK(sv))
+        filled = 1;
+        have_ovl = 1;
+    }
+    else if (SvOK(sv)) {
        amt.fallback=AMGfallNEVER;
+        filled = 1;
+        have_ovl = 1;
+    }
 
     for (i = 1; i < lim; i++)
        amt.table[i] = NULL;