File: 01_old_junk.t

package info (click to toggle)
libclass-isa-perl 0.36-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 116 kB
  • sloc: perl: 40; makefile: 4
file content (28 lines) | stat: -rw-r--r-- 732 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
BEGIN {
    chdir 't' if -d 't';
    #@INC = '../lib';
}

# Time-stamp: "2004-12-29 19:59:33 AST"

BEGIN { $| = 1; print "1..2\n"; }
END {print "not ok 1\n" unless $loaded;}
use Class::ISA;
$loaded = 1;
print "ok 1\n";

  @Food::Fishstick::ISA = qw(Food::Fish  Life::Fungus  Chemicals);
  @Food::Fish::ISA = qw(Food);
  @Food::ISA = qw(Matter);
  @Life::Fungus::ISA = qw(Life);
  @Chemicals::ISA = qw(Matter);
  @Life::ISA = qw(Matter);
  @Matter::ISA = qw();

  use Class::ISA;
  my @path = Class::ISA::super_path('Food::Fishstick');
  my $flat_path = join ' ', @path;
  print "#Food::Fishstick path is:\n# $flat_path\n";
  print
   "Food::Fish Food Matter Life::Fungus Life Chemicals" eq $flat_path ?
     "ok 2\n" : "fail 2!\n";