line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::MixinFactory::NEXT; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
41
|
use strict; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
1093
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
######################################################################## |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub NEXT { |
8
|
116
|
|
|
116
|
0
|
2700
|
my ( $self, $method, @args ) = @_; |
9
|
|
|
|
|
|
|
|
10
|
116
|
|
|
|
|
229
|
my $package = caller(); |
11
|
116
|
|
33
|
|
|
617
|
my @classes = ref($self) || $self; |
12
|
|
|
|
|
|
|
|
13
|
116
|
|
|
|
|
134
|
my $found_current = 0; |
14
|
116
|
|
|
|
|
286
|
while ( my $class = shift @classes ) { |
15
|
406
|
100
|
66
|
|
|
2373
|
if ( $class eq $package ) { |
|
|
100
|
|
|
|
|
|
16
|
116
|
|
|
|
|
141
|
$found_current = 1 |
17
|
|
|
|
|
|
|
} elsif ( $found_current and my $sub = $class->can( $method ) ) { |
18
|
116
|
|
|
|
|
313
|
return &$sub( $self, @args ); |
19
|
|
|
|
|
|
|
} |
20
|
8
|
|
|
8
|
|
40
|
no strict; |
|
8
|
|
|
|
|
14
|
|
|
8
|
|
|
|
|
805
|
|
21
|
290
|
|
|
|
|
597
|
unshift @classes, @{ $class . "::ISA" }; |
|
290
|
|
|
|
|
1776
|
|
22
|
|
|
|
|
|
|
} |
23
|
0
|
|
|
|
|
|
Carp::croak( "Can't find NEXT method for $method" ); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
######################################################################## |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |