1#!./perl
2
3BEGIN {
4    chdir 't' if -d 't';
5    require './test.pl';
6    set_up_inc('../lib');
7}
8
9use utf8;
10use open qw( :utf8 :std );
11
12plan 12;
13
14@ฟ옥ʮ::ISA = "ᶶ";
15*ຜ옥ㄏ::ISA = *ฟ옥ʮ::ISA;
16@ฟ옥ʮ::ISA = "Bᐊㄗ";
17
18ok 'ฟ옥ʮ'->isa("Bᐊㄗ"),
19 'isa after another stash has claimed the @ISA via glob assignment';
20ok 'ຜ옥ㄏ'->isa("Bᐊㄗ"),
21 'isa on the stash that claimed the @ISA via glob assignment';
22ok !ฟ옥ʮ->isa("ᶶ"),
23 '!isa when another stash has claimed the @ISA via glob assignment';
24ok !ຜ옥ㄏ->isa("ᶶ"),
25 '!isa on the stash that claimed the @ISA via glob assignment';
26
27@ฟ옥ʮ::ISA = "ᶶ";
28*ฟ옥ʮ::ISA = ["Bᐊㄗ"];
29
30ok 'ฟ옥ʮ'->isa("Bᐊㄗ"),
31 'isa after glob-to-ref assignment when *ISA is shared';
32ok 'ຜ옥ㄏ'->isa("Bᐊㄗ"),
33 'isa after glob-to-ref assignment on another stash when *ISA is shared';
34ok !ฟ옥ʮ->isa("ᶶ"),
35 '!isa after glob-to-ref assignment when *ISA is shared';
36ok !ຜ옥ㄏ->isa("ᶶ"),
37 '!isa after glob-to-ref assignment on another stash when *ISA is shared';
38
39@ᕘ::ISA = "ᶶ";
40*ጶ::ISA = \@ᕘ::ISA;
41@ᕘ::ISA = "Bᐊㄗ";
42
43ok 'ᕘ'->isa("Bᐊㄗ"),
44 'isa after another stash has claimed the @ISA via ref-to-glob assignment';
45ok 'ጶ'->isa("Bᐊㄗ"),
46 'isa on the stash that claimed the @ISA via ref-to-glob assignment';
47ok !ᕘ->isa("ᶶ"),
48 '!isa when another stash has claimed the @ISA via ref-to-glob assignment';
49ok !ጶ->isa("ᶶ"),
50 '!isa on the stash that claimed the @ISA via ref-to-glob assignment';
51