line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geo::Formatter::FormatBase; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
3212
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
200
|
|
4
|
6
|
|
|
6
|
|
29
|
use strict; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
153
|
|
5
|
6
|
|
|
6
|
|
25
|
use Carp; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
379
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
30
|
use version; our $VERSION = qv('0.0.1'); |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
30
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub import { |
10
|
12
|
|
|
12
|
|
21
|
my $pkg = shift; |
11
|
12
|
|
|
|
|
77
|
my ($fname) = $pkg =~ /Geo::Formatter::Format::(.+)$/; |
12
|
12
|
|
|
|
|
26
|
$fname =~ s/::/_/g; |
13
|
|
|
|
|
|
|
|
14
|
12
|
|
|
|
|
81
|
my $enc = $pkg->enc_wrap(); |
15
|
12
|
|
|
|
|
81
|
my $dec = $pkg->dec_wrap(); |
16
|
|
|
|
|
|
|
|
17
|
12
|
|
|
|
|
96
|
foreach my $name ((lc($fname),$pkg->format_names)) { |
18
|
12
|
|
|
|
|
121
|
$Geo::Formatter::logic{$name} = { |
19
|
|
|
|
|
|
|
encode => $enc, |
20
|
|
|
|
|
|
|
decode => $dec, |
21
|
|
|
|
|
|
|
}; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
12
|
|
|
12
|
1
|
30
|
sub format_names{} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |