File: super2.t

package info (click to toggle)
libspiffy-perl 0.21-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 256 kB
  • ctags: 99
  • sloc: perl: 1,067; makefile: 50
file content (60 lines) | stat: -rw-r--r-- 595 bytes parent folder | download | duplicates (5)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
use lib 'lib';
use strict;
use warnings;

package Alpha;
use Spiffy -Base;

sub three {
    print "ok 6\n";
}

package Foo;
use base 'Alpha';

sub one {
    super;
    print "ok 2\n";
}

sub two {
    print "ok 4\n";
}

package Bar;
use base 'Foo';

sub one {
    super;
    print "ok 3\n";
}

sub two {
    super;
    print "ok 5\n";
}

package Baz;
use base 'Bar';

sub one {
    print "ok 1\n";
    super;
}

sub two {
    super;
    print "not ok 6\n";
}

sub three {
    super;
    print "ok 7\n";
}

package main;
use strict;
print "1..7\n";
Baz->new->one;
Bar->new->two;
Baz->new->three;