line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CPAN::Packager::Builder::Role; |
2
|
2
|
|
|
2
|
|
2529
|
use Mouse::Role; |
|
2
|
|
|
|
|
1246
|
|
|
2
|
|
|
|
|
38
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
requires 'build'; |
5
|
|
|
|
|
|
|
requires 'print_installed_packages'; |
6
|
|
|
|
|
|
|
requires 'package_name'; |
7
|
|
|
|
|
|
|
requires 'is_installed'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has 'package_output_dir' => ( |
10
|
|
|
|
|
|
|
is => 'rw', |
11
|
|
|
|
|
|
|
required => 1 |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has 'conf' => ( |
15
|
|
|
|
|
|
|
is => 'rw', |
16
|
|
|
|
|
|
|
required => 1 |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
has 'release' => ( |
20
|
|
|
|
|
|
|
is => 'rw', |
21
|
|
|
|
|
|
|
default => 1, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
has 'pkg_name' => ( |
25
|
|
|
|
|
|
|
is => 'rw', |
26
|
|
|
|
|
|
|
isa => 'Str', |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub config { |
30
|
0
|
|
|
0
|
0
|
|
my ( $self, $key, $value ) = @_; |
31
|
0
|
0
|
|
|
|
|
die 'key must be passed' unless $key; |
32
|
0
|
0
|
|
|
|
|
die 'value must be passed' unless $value; |
33
|
|
|
|
|
|
|
|
34
|
0
|
0
|
|
|
|
|
return () unless $self->conf->{$key}; |
35
|
0
|
|
0
|
|
|
|
return $self->conf->{$key}->{$value} || (); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub get_package_name { |
39
|
0
|
|
|
0
|
0
|
|
my ($self, $module) = @_; |
40
|
|
|
|
|
|
|
|
41
|
0
|
0
|
|
|
|
|
if ($self->pkg_name) { |
42
|
0
|
|
|
|
|
|
return $self->pkg_name; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
else { |
45
|
0
|
|
|
|
|
|
return $self->package_name( $module->{module} ); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
2
|
|
|
2
|
|
1137
|
no Mouse::Role; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
10
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
__END__ |