This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Eliminate PL_dirty
[perl5.git] / hv.c
diff --git a/hv.c b/hv.c
index b435239..615cec2 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -1856,7 +1856,7 @@ Perl_hv_undef(pTHX_ HV *hv)
     DEBUG_A(Perl_hv_assert(aTHX_ hv));
     xhv = (XPVHV*)SvANY(hv);
 
-    if ((name = HvENAME_get(hv)) && !PL_dirty)
+    if ((name = HvENAME_get(hv)) && PL_phase != PERL_PHASE_DESTRUCT)
     {
         /* Delete the @ISA element before calling mro_package_moved, so it
            does not see it. */