summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-07-12 17:50:51 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-07-12 17:50:51 -0700
commit986d39eeb4080ac83a841368252abaf063cc1486 (patch)
tree256ccc5ac4c43c9338bc2b6c5492dff548362d05 /gv.c
parentdfedf89255b7306231f87f711321b2a976aec65f (diff)
downloadperl-986d39eeb4080ac83a841368252abaf063cc1486.tar.gz
Fix @{*ISA} autovivification
It was not attaching magic to the array, preventing subsequent changes to the array from updating isa caches.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gv.c b/gv.c
index ba8e85ef1f..e0fdc630e9 100644
--- 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;
}