line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geo::Google::Segment; |
2
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
4
|
1
|
|
|
1
|
|
4
|
use Data::Dumper; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
39
|
|
5
|
1
|
|
|
1
|
|
6
|
use URI::Escape; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
85
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.04-rc3'; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
4
|
use constant FMT => <<_FMT_; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
390
|
|
9
|
|
|
|
|
|
|
%s |
10
|
|
|
|
|
|
|
_FMT_ |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
14
|
0
|
|
|
|
|
|
my %arg = @_; |
15
|
0
|
|
|
|
|
|
my $self = bless \%arg, $class; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
0
|
0
|
|
sub from { return shift->{'from'} } |
19
|
0
|
|
|
0
|
0
|
|
sub distance { return shift->{'distance'} } |
20
|
0
|
|
|
0
|
0
|
|
sub id { return shift->{'id'} } |
21
|
0
|
|
|
0
|
0
|
|
sub pointIndex { return shift->{'pointIndex'} } |
22
|
0
|
0
|
|
0
|
0
|
|
sub points { my $self = shift; return $self->{'points'} ? @{ $self->{'points'} } : () } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
0
|
|
sub html { return shift->{'html'} } |
24
|
0
|
|
|
0
|
0
|
|
sub text { my $self = shift; $_ = $self->html(); s## #g; s#\s+# #g; s# ([,:])#$1#g; s#^\s*(.+?)\s*$#$1#; $_ } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
0
|
|
sub time { return shift->{'time'} } |
26
|
0
|
|
|
0
|
0
|
|
sub to { return shift->{'to'} } |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub toXML { |
29
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
30
|
0
|
|
|
|
|
|
return sprintf( FMT, |
31
|
|
|
|
|
|
|
$self->distance(), |
32
|
|
|
|
|
|
|
$self->id(), |
33
|
|
|
|
|
|
|
$self->pointIndex(), |
34
|
|
|
|
|
|
|
$self->time(), |
35
|
|
|
|
|
|
|
$self->text(), |
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
__END__ |