line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# COPYRIGHT: © 2012 Peter Hallam |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Config::Any::Properties; |
4
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PRAGMATIC'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: Config::Any loader for Java-style property files |
7
|
|
|
|
|
|
|
# CREATED: Thu, 4 Oct 2012 05:03:25 UTC |
8
|
|
|
|
|
|
|
# AUTHOR: Peter Hallam |
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
50161
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
94
|
|
11
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
69
|
|
12
|
2
|
|
|
2
|
|
31
|
use v5.10; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
145
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.001001'; # VERSION |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
2
|
|
1104
|
use parent 'Config::Any::Base'; |
|
2
|
|
|
|
|
664
|
|
|
2
|
|
|
|
|
13
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub extensions { |
19
|
1
|
|
|
1
|
1
|
18850
|
return qw{ properties props }; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub load { |
23
|
3
|
|
|
3
|
1
|
11614
|
my ( $class, $file, $opts ) = @_; |
24
|
|
|
|
|
|
|
|
25
|
3
|
100
|
|
|
|
15
|
$opts = {} unless ref $opts eq 'HASH'; |
26
|
|
|
|
|
|
|
|
27
|
3
|
|
|
|
|
5
|
eval { |
28
|
3
|
|
|
|
|
20
|
require Config::Properties; |
29
|
|
|
|
|
|
|
}; |
30
|
3
|
50
|
|
|
|
12
|
unless ( $@ ) { |
31
|
3
|
|
|
|
|
20
|
my $decoder = Config::Properties->new( |
32
|
|
|
|
|
|
|
file => $file, |
33
|
|
|
|
|
|
|
%$opts, |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
2
|
|
|
|
|
20453
|
return $decoder->splitToTree; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub requires_any_of { |
41
|
3
|
|
|
3
|
1
|
265
|
return qw{ Config::Properties }; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |