line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Distribution::Metadata::Factory; |
2
|
1
|
|
|
1
|
|
54997
|
use strict; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
23
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
4
|
1
|
|
|
1
|
|
344
|
use Distribution::Metadata; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
179
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
3
|
|
|
3
|
0
|
2814
|
my ($class, %option) = @_; |
8
|
3
|
|
100
|
|
|
13
|
my $inc = $option{inc} || \@INC; |
9
|
3
|
50
|
|
|
|
7
|
if ($option{fill_archlib}) { |
10
|
0
|
|
|
|
|
0
|
$inc = Distribution::Metadata->_fill_archlib($inc); |
11
|
|
|
|
|
|
|
} |
12
|
3
|
|
|
|
|
12
|
bless { inc => $inc, cache => {} }, $class; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub create_from_module { |
16
|
3
|
|
|
3
|
0
|
12
|
my ($self, $module) = @_; |
17
|
3
|
|
|
|
|
6
|
local $Distribution::Metadata::CACHE = $self->{cache}; |
18
|
3
|
|
|
|
|
12
|
Distribution::Metadata->new_from_module($module, inc => $self->{inc}); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub create_from_file { |
22
|
1
|
|
|
1
|
0
|
7
|
my ($self, $file) = @_; |
23
|
1
|
|
|
|
|
3
|
local $Distribution::Metadata::CACHE = $self->{cache}; |
24
|
1
|
|
|
|
|
8
|
Distribution::Metadata->new_from_file($file, inc => $self->{inc}); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |