Upgrade to NEXT 0.52.
[p5sagit/p5-mst-13.2.git] / lib / NEXT / t / unseen.t
1 BEGIN {
2     if ($ENV{PERL_CORE}) {
3         chdir('t') if -d 't';
4         @INC = qw(../lib);
5     }
6 }
7
8 BEGIN { print "1..10\n"; }
9 use NEXT;
10
11 my $count=1;
12
13 package A;
14 @ISA = qw/B C D/;
15
16 sub test { print "ok ", $count++, "\n"; $_[0]->NEXT::UNSEEN::test;}
17
18 package B;
19 @ISA = qw/C D/;
20 sub test { print "ok ", $count++, "\n"; $_[0]->NEXT::UNSEEN::test;}
21
22 package C;
23 @ISA = qw/D/;
24 sub test { print "ok ", $count++, "\n"; $_[0]->NEXT::UNSEEN::test;}
25
26 package D;
27
28 sub test { print "ok ", $count++, "\n"; $_[0]->NEXT::UNSEEN::test;}
29
30 package main;
31
32 my $foo = {};
33
34 bless($foo,"A");
35
36 $foo->test;
37
38 package Diamond::Base;
39 sub test { print "ok ", $count++, "\n"; shift->NEXT::UNSEEN::test; }
40
41 package Diamond::Left;  @ISA = qw[Diamond::Base];
42 package Diamond::Right; @ISA = qw[Diamond::Base];
43 package Diamond::Top;   @ISA = qw[Diamond::Left Diamond::Right];
44
45 package main;
46
47 Diamond::Top->test;