This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update the perldelta for ExtUtils::Constant.
[perl5.git] / gv.c
diff --git a/gv.c b/gv.c
index 691dbba..9f62066 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -2628,7 +2628,7 @@ Perl_gv_try_downgrade(pTHX_ GV *gv)
 
     /* XXX Why and where does this leave dangling pointers during global
        destruction? */
-    if (PL_dirty) return;
+    if (PL_phase == PERL_PHASE_DESTRUCT) return;
 
     if (!(SvREFCNT(gv) == 1 && SvTYPE(gv) == SVt_PVGV && !SvFAKE(gv) &&
            !SvOBJECT(gv) && !SvREADONLY(gv) &&