Upgrade to CGI.pm-3.31. Includes version bump to CGI::Carp due to a Pod fix.
[p5sagit/p5-mst-13.2.git] / hv.c
diff --git a/hv.c b/hv.c
index a8a5fd1..c8279d8 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -445,7 +445,7 @@ Perl_hv_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
                                                 | return_svp,
                                                 NULL /* no value */,
                                                 0 /* compute hash */);
-                       if (!entry && (action & HV_FETCH_LVALUE)) {
+                       if (!result && (action & HV_FETCH_LVALUE)) {
                            /* This call will free key if necessary.
                               Do it this way to encourage compiler to tail
                               call optimise.  */
@@ -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) {