summaryrefslogtreecommitdiff
path: root/t/mro
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-07-12 17:35:37 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-07-12 17:35:37 -0700
commitdfedf89255b7306231f87f711321b2a976aec65f (patch)
treeff4f3e60744841aeed8fa1861a536d6254b61e2f /t/mro
parentaf7751f6652f1fb8efc5c0fe424de739fc30a332 (diff)
downloadperl-dfedf89255b7306231f87f711321b2a976aec65f.tar.gz
Fix *ISA = *glob_without_array
I broke this in 5.14 with commit 6624142a. In trying to make *ISA = *Other::ISA work, I added logic to make @Other::ISA’s existing magic now point to *ISA’s stash. I skipped that logic if *Other::ISA did not contain an array. But in so doing, I inadvertently skipped the call to mro_isa_changed_in at the same time.
Diffstat (limited to 't/mro')
-rw-r--r--t/mro/basic.t12
1 files changed, 11 insertions, 1 deletions
diff --git a/t/mro/basic.t b/t/mro/basic.t
index 9955b813b6..e1a4dbfddb 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 => 52);
+BEGIN { require q(./test.pl); } plan(tests => 53);
require mro;
@@ -328,3 +328,13 @@ is(eval { MRO_N->testfunc() }, 123);
undef %Thwit::;
ok !Thrext->isa('Sile'), 'undef %package:: updates subclasses';
}
+
+{
+ # Obliterating @ISA via glob assignment
+ # Broken in 5.14.0; fixed in 5.17.2
+ @Gwythaint::ISA = "Fantastic::Creature";
+ undef *This_glob_haD_better_not_exist; # paranoia; must have no array
+ *Gwythaint::ISA = *This_glob_haD_better_not_exist;
+ ok !Gwythaint->isa("Fantastic::Creature"),
+ 'obliterating @ISA via glob assignment';
+}