line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package exact::conf; |
2
|
|
|
|
|
|
|
# ABSTRACT: Cascading merged application configuration extension for exact |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
280215
|
use 5.014; |
|
1
|
|
|
|
|
11
|
|
5
|
1
|
|
|
1
|
|
6
|
use exact; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.08'; # VERSION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub import { |
10
|
1
|
|
|
1
|
|
22
|
my ( $self, $params, $caller ) = @_; |
11
|
1
|
|
33
|
|
|
4
|
$caller //= caller(); |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
50
|
|
|
8
|
my @params = grep { length } split( /[,\s]+/, $params || '' ); |
|
0
|
|
|
|
|
0
|
|
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
551
|
require Config::App; |
16
|
1
|
50
|
33
|
|
|
65522
|
Config::App->import(@params) if ( @params or not length $params ); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
{ |
19
|
1
|
|
|
1
|
|
1004
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
181
|
|
|
1
|
|
|
|
|
6102
|
|
20
|
1
|
|
|
|
|
3
|
my $method = 'conf'; |
21
|
1
|
50
|
|
|
|
2
|
*{ $caller . '::' . $method } = \&$method unless ( defined &{ $caller . '::' . $method } ); |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
10
|
|
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub conf { |
26
|
1
|
|
|
1
|
1
|
6176
|
shift; |
27
|
1
|
|
|
|
|
10
|
return Config::App->new(@_); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |