line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CPAN::Packager::Config::Merger; |
2
|
1
|
|
|
1
|
|
7
|
use Mouse; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
11
|
|
3
|
1
|
|
|
1
|
|
2009
|
use YAML; |
|
1
|
|
|
|
|
10235
|
|
|
1
|
|
|
|
|
195
|
|
4
|
1
|
|
|
1
|
|
744
|
use CPAN::Packager::Config::Loader; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
5
|
1
|
|
|
1
|
|
8
|
use List::Compare; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
6
|
1
|
|
|
1
|
|
6
|
use CPAN::Packager::ListUtil qw(any); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
70
|
|
7
|
1
|
|
|
1
|
|
1214
|
use Hash::Merge qw(merge); |
|
1
|
|
|
|
|
4827
|
|
|
1
|
|
|
|
|
423
|
|
8
|
|
|
|
|
|
|
Hash::Merge::set_behavior('RIGHT_PRECEDENT'); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub merge_module_config { |
11
|
0
|
|
|
0
|
0
|
|
my ( $self, $modules, $config ) = @_; |
12
|
0
|
|
|
|
|
|
my $merged_modules = merge( $modules, $config->{modules} ); |
13
|
0
|
|
|
|
|
|
$self->_filter_depends($merged_modules, $config); |
14
|
0
|
|
|
|
|
|
$config->{modules} = $merged_modules; |
15
|
0
|
|
|
|
|
|
$config; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub _filter_depends { |
19
|
0
|
|
|
0
|
|
|
my ($self, $modules, $config) = @_; |
20
|
0
|
|
|
|
|
|
for my $module ( values %{$modules} ) { |
|
0
|
|
|
|
|
|
|
21
|
0
|
0
|
0
|
|
|
|
next unless $module->{module} && $module->{depends} && $module->{no_depends}; |
|
|
|
0
|
|
|
|
|
22
|
0
|
0
|
0
|
0
|
|
|
next if ( $config->{global}->{no_depends} && any { $_->{module} eq $module } @{ $config->{global}->{no_depends} } ); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# FIXME: hmm. |
24
|
0
|
0
|
|
|
|
|
my @new_depends = List::Compare->new( |
25
|
0
|
0
|
|
|
|
|
[ map { ( ref $_ eq "HASH" ) ? $_->{module} : $_ } @{ $module->{depends} || () } ] , |
|
0
|
|
|
|
|
|
|
26
|
0
|
0
|
|
|
|
|
[ map { $_->{module} } @{ $module->{no_depends} || () } ] |
|
0
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
)->get_unique; |
28
|
0
|
|
|
|
|
|
$module->{depends} = \@new_depends; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
1
|
|
14
|
no Mouse; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
11
|
|
33
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |