This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix @{*ISA} autovivification
[perl5.git] / gv.c
diff --git a/gv.c b/gv.c
index ba8e85e..e0fdc63 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -83,6 +83,9 @@ Perl_gv_add_by_type(pTHX_ GV *gv, svtype type)
 
     if (!*where)
        *where = newSV_type(type);
+    if (type == SVt_PVAV && GvNAMELEN(gv) == 3
+     && strnEQ(GvNAME(gv), "ISA", 3))
+       sv_magic(*where, (SV *)gv, PERL_MAGIC_isa, NULL, 0);
     return gv;
 }