| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package String::Normal::Config; |
|
2
|
9
|
|
|
9
|
|
69
|
use strict; |
|
|
9
|
|
|
|
|
20
|
|
|
|
9
|
|
|
|
|
339
|
|
|
3
|
9
|
|
|
9
|
|
47
|
use warnings; |
|
|
9
|
|
|
|
|
15
|
|
|
|
9
|
|
|
|
|
530
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
9
|
|
|
9
|
|
5200
|
use String::Normal::Config::BusinessStem; |
|
|
9
|
|
|
|
|
30
|
|
|
|
9
|
|
|
|
|
353
|
|
|
6
|
9
|
|
|
9
|
|
6501
|
use String::Normal::Config::BusinessStop; |
|
|
9
|
|
|
|
|
30
|
|
|
|
9
|
|
|
|
|
336
|
|
|
7
|
9
|
|
|
9
|
|
5003
|
use String::Normal::Config::BusinessCompress; |
|
|
9
|
|
|
|
|
29
|
|
|
|
9
|
|
|
|
|
346
|
|
|
8
|
9
|
|
|
9
|
|
4959
|
use String::Normal::Config::AddressStem; |
|
|
9
|
|
|
|
|
29
|
|
|
|
9
|
|
|
|
|
308
|
|
|
9
|
9
|
|
|
9
|
|
4998
|
use String::Normal::Config::AddressStop; |
|
|
9
|
|
|
|
|
27
|
|
|
|
9
|
|
|
|
|
388
|
|
|
10
|
9
|
|
|
9
|
|
7182
|
use String::Normal::Config::States; |
|
|
9
|
|
|
|
|
31
|
|
|
|
9
|
|
|
|
|
417
|
|
|
11
|
9
|
|
|
9
|
|
4909
|
use String::Normal::Config::AreaCodes; |
|
|
9
|
|
|
|
|
33
|
|
|
|
9
|
|
|
|
|
364
|
|
|
12
|
9
|
|
|
9
|
|
4783
|
use String::Normal::Config::TitleStem; |
|
|
9
|
|
|
|
|
30
|
|
|
|
9
|
|
|
|
|
323
|
|
|
13
|
9
|
|
|
9
|
|
4837
|
use String::Normal::Config::TitleStop; |
|
|
9
|
|
|
|
|
28
|
|
|
|
9
|
|
|
|
|
5852
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub _slurp { |
|
16
|
14
|
|
|
14
|
|
35
|
my $fh = shift; |
|
17
|
14
|
|
|
|
|
29
|
my @data = (); |
|
18
|
14
|
100
|
|
|
|
3182
|
chomp( @data = map { $_ || () } map { split /\s+/, $_, 2 } <$fh> ); |
|
|
7518
|
|
|
|
|
18066
|
|
|
|
3759
|
|
|
|
|
12070
|
|
|
19
|
14
|
|
|
|
|
915
|
close $fh; |
|
20
|
14
|
|
|
|
|
2855
|
return @data; |
|
21
|
|
|
|
|
|
|
} |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub _expand_ranges { |
|
24
|
3
|
|
|
3
|
|
9
|
my @expanded = (); |
|
25
|
|
|
|
|
|
|
|
|
26
|
3
|
|
|
|
|
10
|
for my $line (@_) { |
|
27
|
625
|
|
|
|
|
1260
|
my @ranges = map { /(\w)-?(\w)/;[$1..$2] } $line =~ /\[(\w-?\w)+\]/g; |
|
|
32
|
|
|
|
|
85
|
|
|
|
32
|
|
|
|
|
345
|
|
|
28
|
625
|
|
|
|
|
1055
|
$line =~ s/\[.*//; |
|
29
|
625
|
|
|
|
|
1339
|
_expand( \my @results, $line, @ranges ); |
|
30
|
625
|
|
|
|
|
1555
|
push @expanded, @results; |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
3
|
|
|
|
|
257
|
return @expanded; |
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub _expand { |
|
37
|
1133
|
|
|
1133
|
|
2111
|
my ($results,$str,$car,@cdr) = @_; |
|
38
|
|
|
|
|
|
|
|
|
39
|
1133
|
100
|
|
|
|
2223
|
if (ref $car ne 'ARRAY') { |
|
40
|
1101
|
|
|
|
|
1754
|
push @$results, $str; |
|
41
|
1101
|
|
|
|
|
1968
|
return; |
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
|
|
44
|
32
|
|
|
|
|
56
|
for (@$car) { |
|
45
|
508
|
|
|
|
|
1040
|
_expand( $results, $str . $_, @cdr ); |
|
46
|
|
|
|
|
|
|
}; |
|
47
|
|
|
|
|
|
|
} |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub _attach { |
|
50
|
3338
|
|
|
3338
|
|
6009
|
my ($t, $car, @cdr) = @_; |
|
51
|
3338
|
100
|
|
|
|
7625
|
return unless defined $car; |
|
52
|
2237
|
100
|
|
|
|
5489
|
$t->{$car} = {} unless ref $t->{$car}; |
|
53
|
2237
|
|
|
|
|
3903
|
_attach( $t->{$car}, @cdr ); |
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |