line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Collect::Package; |
2
|
7
|
|
|
7
|
|
35
|
use strict; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
228
|
|
3
|
7
|
|
|
7
|
|
34
|
use warnings; |
|
7
|
|
|
|
|
9
|
|
|
7
|
|
|
|
|
318
|
|
4
|
7
|
|
|
7
|
|
33
|
use Carp; |
|
7
|
|
|
|
|
19
|
|
|
7
|
|
|
|
|
2722
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
22
|
|
|
22
|
0
|
785
|
my ($class, @args) = @_; |
8
|
22
|
100
|
|
|
|
69
|
if (ref $class) { |
9
|
5
|
100
|
|
|
|
73
|
return $class->{package}->new(@args) if $class->{package}->can('new'); |
10
|
1
|
|
|
|
|
288
|
croak qq{Can't locate object method "new" via package "$class->{package}"}; |
11
|
|
|
|
|
|
|
} else { |
12
|
17
|
|
|
|
|
232
|
return bless { @args }, $class; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub require { |
17
|
5
|
|
|
5
|
0
|
3338
|
my ($self) = shift; |
18
|
5
|
100
|
|
|
|
8
|
eval { require $self->{path} } or croak $@; |
|
5
|
|
|
|
|
3390
|
|
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
21
|
|
|
21
|
0
|
728
|
sub package { shift->{package} } |
22
|
1
|
|
|
1
|
0
|
522
|
sub path { shift->{path} } |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |