| 1 |
BEGIN { |
| 2 |
chdir 't' if -d 't'; |
| 3 |
#@INC = '../lib'; |
| 4 |
} |
| 5 |
|
| 6 |
# Time-stamp: "2004-12-29 19:59:33 AST" |
| 7 |
|
| 8 |
BEGIN { $| = 1; print "1..2\n"; } |
| 9 |
END {print "not ok 1\n" unless $loaded;} |
| 10 |
use Class::ISA; |
| 11 |
$loaded = 1; |
| 12 |
print "ok 1\n"; |
| 13 |
|
| 14 |
@Food::Fishstick::ISA = qw(Food::Fish Life::Fungus Chemicals); |
| 15 |
@Food::Fish::ISA = qw(Food); |
| 16 |
@Food::ISA = qw(Matter); |
| 17 |
@Life::Fungus::ISA = qw(Life); |
| 18 |
@Chemicals::ISA = qw(Matter); |
| 19 |
@Life::ISA = qw(Matter); |
| 20 |
@Matter::ISA = qw(); |
| 21 |
|
| 22 |
use Class::ISA; |
| 23 |
my @path = Class::ISA::super_path('Food::Fishstick'); |
| 24 |
my $flat_path = join ' ', @path; |
| 25 |
print "#Food::Fishstick path is:\n# $flat_path\n"; |
| 26 |
print |
| 27 |
"Food::Fish Food Matter Life::Fungus Life Chemicals" eq $flat_path ? |
| 28 |
"ok 2\n" : "fail 2!\n"; |