line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geo::Coordinates::Converter::Format; |
2
|
6
|
|
|
6
|
|
4877
|
use strict; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
217
|
|
3
|
6
|
|
|
6
|
|
32
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
166
|
|
4
|
|
|
|
|
|
|
|
5
|
6
|
|
|
6
|
|
32
|
use Carp; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
4013
|
|
6
|
|
|
|
|
|
|
|
7
|
0
|
|
|
0
|
0
|
0
|
sub name { '' } |
8
|
0
|
|
|
0
|
0
|
0
|
sub detect { croak 'This method is unimplemented' } |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
272
|
|
|
272
|
0
|
491
|
my($class, $args) = @_; |
12
|
272
|
50
|
|
|
|
818
|
$args = +{} unless defined $args; |
13
|
272
|
|
|
|
|
366
|
bless { %{ $args } }, $class; |
|
272
|
|
|
|
|
1567
|
|
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
0
|
0
|
0
|
sub normaraiz { goto &normalize } # alias for backward compatibility |
17
|
|
|
|
|
|
|
sub normalize { |
18
|
68
|
|
|
68
|
0
|
121
|
my($self, $point) = @_; |
19
|
|
|
|
|
|
|
|
20
|
68
|
|
|
|
|
161
|
for my $meth (qw/ lat lng /) { |
21
|
136
|
100
|
|
|
|
1132
|
next unless defined $point->$meth; |
22
|
110
|
100
|
|
|
|
758
|
if ($point->$meth =~ /^\+(.+)$/) { |
|
|
100
|
|
|
|
|
|
23
|
10
|
|
|
|
|
107
|
$point->$meth($1); |
24
|
|
|
|
|
|
|
} elsif (my($prefix, $val) = $point->$meth =~ /^([NEWS])(.+)$/i) { |
25
|
20
|
100
|
|
|
|
380
|
$prefix =~ /^[WS]$/i ? $point->$meth("-$val") : $point->$meth($val); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
20
|
|
|
20
|
0
|
52
|
sub to { $_[1] } |
31
|
24
|
|
|
24
|
0
|
59
|
sub from { $_[1] } |
32
|
42
|
|
|
42
|
0
|
304
|
sub round { $_[1] } |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |