line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
2
|
|
|
2
|
|
137458
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
86
|
|
3
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
115
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Path::IsDev::HeuristicSet::FromConfig::Loader; |
6
|
|
|
|
|
|
|
BEGIN { |
7
|
2
|
|
|
2
|
|
807
|
$Path::IsDev::HeuristicSet::FromConfig::Loader::AUTHORITY = 'cpan:KENTNL'; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
{ |
10
|
|
|
|
|
|
|
$Path::IsDev::HeuristicSet::FromConfig::Loader::VERSION = '0.002000'; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# ABSTRACT: Configuration loader and decoder for C<::FromConfig> |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub _path { |
16
|
3
|
|
|
3
|
|
4074
|
require Path::Tiny; |
17
|
3
|
|
|
|
|
25
|
goto \&Path::Tiny::path; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
use Class::Tiny { |
22
|
3
|
|
|
|
|
93
|
dist => sub { 'Path-IsDev-HeuristicSet-FromConfig' }, |
23
|
3
|
|
|
|
|
149
|
module => sub { 'Path::IsDev::HeuristicSet::FromConfig' }, |
24
|
3
|
|
|
|
|
303
|
config_file => sub { 'config.json' }, |
25
|
3
|
|
|
|
|
144
|
config_file_full => sub { _path( $_[0]->config->configdir )->child( $_[0]->config_file ) }, |
26
|
|
|
|
|
|
|
config => sub { |
27
|
3
|
|
|
|
|
2173
|
require File::UserConfig; |
28
|
3
|
|
|
|
|
20304
|
return File::UserConfig->new( |
29
|
|
|
|
|
|
|
dist => $_[0]->dist, |
30
|
|
|
|
|
|
|
module => $_[0]->module, |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
decoder => sub { |
34
|
3
|
|
|
|
|
42
|
require JSON; |
35
|
3
|
|
|
|
|
91
|
return JSON->new(); |
36
|
|
|
|
|
|
|
}, |
37
|
|
|
|
|
|
|
data => sub { |
38
|
3
|
|
|
|
|
84
|
$_[0]->decoder->decode( $_[0]->config_file_full->slurp_utf8 ); |
39
|
|
|
|
|
|
|
}, |
40
|
|
|
|
|
|
|
heuristics => sub { |
41
|
2
|
|
50
|
|
|
234
|
return $_[0]->data->{heuristics} || []; |
42
|
|
|
|
|
|
|
}, |
43
|
|
|
|
|
|
|
negative_heuristics => sub { |
44
|
2
|
|
50
|
|
|
3429
|
return $_[0]->data->{negative_heuristics} || []; |
45
|
|
|
|
|
|
|
}, |
46
|
2
|
|
|
2
|
|
2157
|
}; |
|
2
|
|
|
|
|
7788
|
|
|
2
|
|
|
|
|
57
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
__END__ |