This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Portability fix for new Digest::SHA Makefile.PL.
[perl5.git] / mro.c
diff --git a/mro.c b/mro.c
index 2d1d887..be2038f 100644 (file)
--- a/mro.c
+++ b/mro.c
@@ -578,6 +578,7 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash)
                 revmeta->cache_gen++;
             if(revmeta->mro_nextmethod)
                 hv_clear(revmeta->mro_nextmethod);
+           if (!SvOBJECT(revstash)) SvSTASH(revstash) = NULL;
 
            (void)
              hv_store(
@@ -1356,6 +1357,7 @@ Perl_mro_method_changed_in(pTHX_ HV *stash)
             mrometa->cache_gen++;
             if(mrometa->mro_nextmethod)
                 hv_clear(mrometa->mro_nextmethod);
+            if (!SvOBJECT(revstash)) SvSTASH(revstash) = NULL;
         }
     }