line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geo::Formatter::FormatBase::Double; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
3372
|
use warnings; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
168
|
|
4
|
6
|
|
|
6
|
|
27
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
152
|
|
5
|
6
|
|
|
6
|
|
29
|
use Carp; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
314
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
30
|
use version; our $VERSION = qv('0.0.1'); |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
46
|
|
8
|
6
|
|
|
6
|
|
535
|
use base qw(Geo::Formatter::FormatBase); |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
660
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub enc_wrap { |
11
|
12
|
|
|
12
|
1
|
83
|
my $pkg = shift; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
return $pkg->can("encode") ? sub { |
14
|
13
|
50
|
33
|
13
|
|
142
|
if (@_ < 2) { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
15
|
0
|
|
|
|
|
0
|
croak "Latitude and Longitude are neccesary"; |
16
|
|
|
|
|
|
|
} elsif (@_ > 3) { |
17
|
0
|
|
|
|
|
0
|
croak "Too many arguments"; |
18
|
|
|
|
|
|
|
} elsif (@_ == 3 && ref($_[2]) ne "HASH") { |
19
|
0
|
|
|
|
|
0
|
croak "Option value must be hash reference"; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
13
|
|
|
|
|
95
|
my @ret = $pkg->encode(@_); |
23
|
|
|
|
|
|
|
|
24
|
13
|
50
|
|
|
|
84
|
wantarray ? @ret : \@ret; |
25
|
12
|
50
|
|
|
|
184
|
} : undef; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub dec_wrap { |
29
|
12
|
|
|
12
|
1
|
19
|
my $pkg = shift; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
return $pkg->can("decode") ? sub { |
32
|
14
|
50
|
33
|
14
|
|
195
|
if (@_ < 2) { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
33
|
0
|
|
|
|
|
0
|
croak "Latitude and Longitude are neccesary"; |
34
|
|
|
|
|
|
|
} elsif (@_ > 3) { |
35
|
0
|
|
|
|
|
0
|
croak "Too many arguments"; |
36
|
|
|
|
|
|
|
} elsif (@_ == 3 && ref($_[2]) ne "HASH") { |
37
|
0
|
|
|
|
|
0
|
croak "Option value must be hash reference"; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
14
|
|
|
|
|
87
|
my @ret = $pkg->decode(@_); |
41
|
|
|
|
|
|
|
|
42
|
14
|
50
|
|
|
|
79
|
wantarray ? @ret : \@ret; |
43
|
12
|
50
|
|
|
|
105
|
} : undef; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__END__ |