summaryrefslogtreecommitdiff
path: root/t/mro
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-11-13 21:28:05 -0800
committerFather Chrysostomos <sprout@cpan.org>2010-11-13 21:28:05 -0800
commite1603486d4c4f2826ab41e50c9315d9914cc9dfa (patch)
treeabdbaadf1ebd506533a769f8f2b32bd4c40f85af /t/mro
parent6624142a770b3cb9a18e1968e0294117f8f8efa1 (diff)
downloadperl-e1603486d4c4f2826ab41e50c9315d9914cc9dfa.tar.gz
Oops. I need to learn how to use git add.
Diffstat (limited to 't/mro')
-rw-r--r--t/mro/isa_aliases.t31
1 files changed, 31 insertions, 0 deletions
diff --git a/t/mro/isa_aliases.t b/t/mro/isa_aliases.t
new file mode 100644
index 0000000000..0635efcdf9
--- /dev/null
+++ b/t/mro/isa_aliases.t
@@ -0,0 +1,31 @@
+#!./perl
+
+BEGIN { chdir 't'; @INC = '../lib'; require './test.pl' }
+
+plan 8;
+
+@Foogh::ISA = "Bar";
+*Phoogh::ISA = *Foogh::ISA;
+@Foogh::ISA = "Baz";
+
+ok 'Foogh'->isa("Baz"),
+ 'isa after another stash has claimed the @ISA via glob assignment';
+ok 'Phoogh'->isa("Baz"),
+ 'isa on the stash that claimed the @ISA via glob assignment';
+ok !Foogh->isa("Bar"),
+ '!isa when another stash has claimed the @ISA via glob assignment';
+ok !Phoogh->isa("Bar"),
+ '!isa on the stash that claimed the @ISA via glob assignment';
+
+@Foo::ISA = "Bar";
+*Phoo::ISA = \@Foo::ISA;
+@Foo::ISA = "Baz";
+
+ok 'Foo'->isa("Baz"),
+ 'isa after another stash has claimed the @ISA via ref-to-glob assignment';
+ok 'Phoo'->isa("Baz"),
+ 'isa on the stash that claimed the @ISA via ref-to-glob assignment';
+ok !Foo->isa("Bar"),
+ '!isa when another stash has claimed the @ISA via ref-to-glob assignment';
+ok !Phoo->isa("Bar"),
+ '!isa on the stash that claimed the @ISA via ref-to-glob assignment';