line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package parent::versioned; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
206267
|
use strict; |
|
8
|
|
|
|
|
31
|
|
|
8
|
|
|
|
|
1264
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.002'; |
6
|
|
|
|
|
|
|
$VERSION = eval "$VERSION"; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# Based on parent.pm, version 0.237; |
9
|
|
|
|
|
|
|
# parent was included in the Perl core beginning with Perl 5.10.1, |
10
|
|
|
|
|
|
|
# and is dual-lived on CPAN. |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub import { |
13
|
27
|
|
|
27
|
|
11237
|
my $class = shift; |
14
|
|
|
|
|
|
|
|
15
|
27
|
|
|
|
|
57
|
my $inheritor = caller(0); |
16
|
|
|
|
|
|
|
|
17
|
27
|
100
|
100
|
|
|
154
|
if ( @_ and $_[0] eq '-norequire' ) { |
18
|
15
|
|
|
|
|
25
|
shift @_; |
19
|
|
|
|
|
|
|
} else { |
20
|
12
|
|
|
|
|
37
|
for ( my @filename = @_ ) { |
21
|
|
|
|
|
|
|
|
22
|
8
|
100
|
|
|
|
26
|
$_ = $_->[0] if ref $_ eq 'ARRAY'; |
23
|
|
|
|
|
|
|
|
24
|
8
|
|
|
|
|
32
|
s{::|'}{/}g; |
25
|
8
|
|
|
|
|
1969
|
require "$_.pm"; # dies if the file is not found |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
{ |
30
|
8
|
|
|
8
|
|
52
|
no strict 'refs'; |
|
8
|
|
|
|
|
12
|
|
|
8
|
|
|
|
|
979
|
|
|
24
|
|
|
|
|
74
|
|
31
|
24
|
|
|
|
|
157
|
push @{"$inheritor\::ISA"}, |
32
|
24
|
100
|
|
|
|
31
|
map {ref($_) eq 'ARRAY' ? do {$_->[0]->VERSION($_->[1]); $_->[0]} : $_ } |
|
24
|
|
|
|
|
4299
|
|
|
11
|
|
|
|
|
203
|
|
|
6
|
|
|
|
|
83
|
|
33
|
|
|
|
|
|
|
@_; # dies if a loop is detected or if a requisite version is not met. |
34
|
|
|
|
|
|
|
}; |
35
|
|
|
|
|
|
|
}; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |