3 BEGIN { chdir 't' if -d 't'; @INC = '../lib'; require './test.pl' }
8 *Phoogh::ISA = *Foogh::ISA;
11 ok 'Foogh'->isa("Baz"),
12 'isa after another stash has claimed the @ISA via glob assignment';
13 ok 'Phoogh'->isa("Baz"),
14 'isa on the stash that claimed the @ISA via glob assignment';
15 ok !Foogh->isa("Bar"),
16 '!isa when another stash has claimed the @ISA via glob assignment';
17 ok !Phoogh->isa("Bar"),
18 '!isa on the stash that claimed the @ISA via glob assignment';
21 *Foogh::ISA = ["Baz"];
23 ok 'Foogh'->isa("Baz"),
24 'isa after glob-to-ref assignment when *ISA is shared';
25 ok 'Phoogh'->isa("Baz"),
26 'isa after glob-to-ref assignment on another stash when *ISA is shared';
27 ok !Foogh->isa("Bar"),
28 '!isa after glob-to-ref assignment when *ISA is shared';
29 ok !Phoogh->isa("Bar"),
30 '!isa after glob-to-ref assignment on another stash when *ISA is shared';
33 *Phoo::ISA = \@Foo::ISA;
37 'isa after another stash has claimed the @ISA via ref-to-glob assignment';
38 ok 'Phoo'->isa("Baz"),
39 'isa on the stash that claimed the @ISA via ref-to-glob assignment';
41 '!isa when another stash has claimed the @ISA via ref-to-glob assignment';
43 '!isa on the stash that claimed the @ISA via ref-to-glob assignment';
45 *Fooo::ISA = *Baro::ISA;
47 sub Bazo::ook { "Baz" }
50 local *Fooo::ISA = ["L"];
51 is 'Baro'->ook, 'See', 'localised *ISA=$ref assignment';