line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package |
2
|
|
|
|
|
|
|
Twitter::Text::Configuration; # hide from PAUSE |
3
|
4
|
|
|
4
|
|
552
|
use strict; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
144
|
|
4
|
4
|
|
|
4
|
|
27
|
use warnings; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
114
|
|
5
|
4
|
|
|
4
|
|
2759
|
use JSON (); |
|
4
|
|
|
|
|
40139
|
|
|
4
|
|
|
|
|
126
|
|
6
|
4
|
|
|
4
|
|
3652
|
use Path::Tiny qw(path); |
|
4
|
|
|
|
|
45237
|
|
|
4
|
|
|
|
|
294
|
|
7
|
4
|
|
|
4
|
|
508
|
use File::Share qw(dist_file); |
|
4
|
|
|
|
|
27309
|
|
|
4
|
|
|
|
|
922
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# internal use only, do not use this module directly. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my %config_cache; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub configuration_from_file { |
14
|
60
|
|
|
60
|
0
|
171
|
my $config_name = shift; |
15
|
|
|
|
|
|
|
|
16
|
60
|
100
|
|
|
|
332
|
return $config_cache{$config_name} if exists $config_cache{$config_name}; |
17
|
|
|
|
|
|
|
|
18
|
3
|
|
33
|
|
|
30
|
return $config_cache{$config_name} ||= JSON::decode_json(path(dist_file('Twitter-Text', "config/$config_name.json"))->slurp); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub V1 { |
22
|
8
|
|
|
8
|
0
|
17
|
return configuration_from_file('v1'); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub V2 { |
26
|
28
|
|
|
28
|
0
|
654279
|
return configuration_from_file('v2'); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub V3 { |
30
|
24
|
|
|
24
|
0
|
56
|
return configuration_from_file('v3'); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub default_configuration { |
34
|
24
|
|
|
24
|
0
|
69
|
return V3; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |