line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Config::Any::Merge; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
165811
|
use warnings; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
122
|
|
4
|
4
|
|
|
4
|
|
19
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
142
|
|
5
|
4
|
|
|
4
|
|
20
|
use base 'Config::Any'; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
12790
|
|
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
56554
|
use Hash::Merge qw/merge/; |
|
4
|
|
|
|
|
12243
|
|
|
4
|
|
|
|
|
1258
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.08'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub _load { |
12
|
5
|
|
|
5
|
|
386
|
my($class,$args) = @_; |
13
|
5
|
|
|
|
|
13
|
my $config_merged = {}; |
14
|
|
|
|
|
|
|
|
15
|
5
|
|
|
|
|
17
|
$args->{flatten_to_hash} = 1; |
16
|
|
|
|
|
|
|
|
17
|
5
|
|
|
|
|
12
|
my $override = 1; |
18
|
5
|
100
|
|
|
|
30
|
if (defined $args->{override} ) { |
19
|
4
|
|
|
|
|
12
|
$override = $args->{override}; |
20
|
4
|
|
|
|
|
14
|
delete $args->{override}; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
5
|
100
|
|
|
|
24
|
if ($override) { |
24
|
3
|
|
|
|
|
32
|
Hash::Merge::set_behavior('RIGHT_PRECEDENT'); |
25
|
|
|
|
|
|
|
} else { |
26
|
2
|
|
|
|
|
11
|
Hash::Merge::set_behavior('LEFT_PRECEDENT'); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
5
|
|
|
|
|
148
|
my $config_any = $class->SUPER::_load($args); |
30
|
|
|
|
|
|
|
|
31
|
5
|
|
|
|
|
66974
|
foreach my $file (grep { $config_any->{$_} } @{$args->{files}}) { |
|
11
|
|
|
|
|
90
|
|
|
5
|
|
|
|
|
20
|
|
32
|
10
|
|
|
|
|
14594
|
$config_merged = merge($config_merged, $config_any->{$file}); |
33
|
|
|
|
|
|
|
} |
34
|
5
|
|
|
|
|
850
|
return $config_merged; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; # End of Config::Any::Merge |
38
|
|
|
|
|
|
|
__END__ |