diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-11-13 11:19:38 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-11-13 11:19:38 -0800 |
commit | b9e3049212ebaa8a7f488eb927dee6e3d28f569f (patch) | |
tree | 38820770657b3521af8b47970934a9a40bee7f04 /t/mro | |
parent | f3d2f32d14be3c0a0c8b7228649181b430f8d11a (diff) | |
download | perl-b9e3049212ebaa8a7f488eb927dee6e3d28f569f.tar.gz |
Fix undef %Foo:: to update subclasses
This is something I think I broke with 80ebaca, which made sure
that isa linearisations were cached on subclasses after calls
to mro_isa_changed_in (so the data could be used to delete
isarev entries).
The result is that hv_undef, which calls mro_isa_changed_in before
deleting everything, was updating the subclasses’ isa caches while its
own @ISA was still visible.
Diffstat (limited to 't/mro')
-rw-r--r-- | t/mro/basic.t | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/t/mro/basic.t b/t/mro/basic.t index c6f25429b8..b42c802b49 100644 --- a/t/mro/basic.t +++ b/t/mro/basic.t @@ -3,7 +3,7 @@ use strict; use warnings; -BEGIN { require q(./test.pl); } plan(tests => 51); +BEGIN { require q(./test.pl); } plan(tests => 52); require mro; @@ -320,3 +320,11 @@ is(eval { MRO_N->testfunc() }, 123); delete $Blength::{ISA}; ok !Blength->isa("Bladd"), 'delete $package::{ISA}'; } + +{ + # Undefining stashes + @Thrext::ISA = "Thwit"; + @Thwit::ISA = "Sile"; + undef %Thwit::; + ok !Thrext->isa('Sile'), 'undef %package:: updates subclasses'; +} |