summaryrefslogtreecommitdiff
path: root/mro.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-05-18 13:46:59 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-05-21 18:09:28 -0700
commit9cbd5ca32e06d6687365340d15ef70b749018da7 (patch)
tree890e9c990b70fd0632cfddc285948a334c4c1a59 /mro.c
parent929e99945d25016c2ab768359ac6d69cda826013 (diff)
downloadperl-9cbd5ca32e06d6687365340d15ef70b749018da7.tar.gz
Make @ISA changes update overloadedness
If a non-overloaded class begins inheriting overloading due to @ISA changes, we need to set the overloaded (AMAGIC) flag on the stash to indicate that. Updating caches shouldn’t require a dummy blessing.
Diffstat (limited to 'mro.c')
-rw-r--r--mro.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mro.c b/mro.c
index a8ff42ec8d..41e34cd6d5 100644
--- a/mro.c
+++ b/mro.c
@@ -542,6 +542,9 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash)
/* wipe next::method cache too */
if(meta->mro_nextmethod) hv_clear(meta->mro_nextmethod);
+ /* Changes to @ISA might turn overloading on */
+ HvAMAGIC_on(stash);
+
/* Iterate the isarev (classes that are our children),
wiping out their linearization, method and isa caches
and upating PL_isarev. */