This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ex-PVBM and mro interact badly
[perl5.git] / hv.c
diff --git a/hv.c b/hv.c
index 95df7c8..c8279d8 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -1450,7 +1450,7 @@ Perl_hv_free_ent(pTHX_ HV *hv, register HE *entry)
     if (!entry)
        return;
     val = HeVAL(entry);
-    if (val && isGV(val) && GvCVu(val) && HvNAME_get(hv))
+    if (val && isGV(val) && isGV_with_GP(val) && GvCVu(val) && HvNAME_get(hv))
         mro_method_changed_in(hv);     /* deletion of method from stash */
     SvREFCNT_dec(val);
     if (HeKLEN(entry) == HEf_SVKEY) {