| 1 | package Geo::Google::Segment; | ||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use Data::Dumper; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use URI::Escape; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | our $VERSION = '0.04-rc3'; | |||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use constant FMT => <<_FMT_; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | <segment distance="%s" id="%s" pointIndex="%s" time="%s">%s</segment> | ||||||||||
| 10 | _FMT_ | ||||||||||
| 11 | |||||||||||
| 12 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 13 | 0 | my $class = shift; | |||||||||
| 14 | 0 | my %arg = @_; | |||||||||
| 15 | 0 | my $self = bless \%arg, $class; | |||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | 0 | ▶ | sub from { return shift->{'from'} } | ||||||||
|
Subroutine
from: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 19 | 0 | ▶ | sub distance { return shift->{'distance'} } | ||||||||
|
Subroutine
distance: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 20 | 0 | ▶ | sub id { return shift->{'id'} } | ||||||||
|
Subroutine
id: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 21 | 0 | ▶ | sub pointIndex { return shift->{'pointIndex'} } | ||||||||
|
Subroutine
pointIndex: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 22 | 0 | ▶ | sub points { my $self = shift; return $self->{'points'} ? @{ $self->{'points'} } : () } | ||||||||
|
Subroutine
points: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 23 | 0 | ▶ | sub html { return shift->{'html'} } | ||||||||
|
Subroutine
html: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 24 | 0 | ▶ | sub text { my $self = shift; $_ = $self->html(); s#<script.+?</script##g; s#<.+?># #g; s#\s+# #g; s# ([,:])#$1#g; s#^\s*(.+?)\s*$#$1#; $_ } | ||||||||
|
Subroutine
text: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 25 | 0 | ▶ | sub time { return shift->{'time'} } | ||||||||
|
Subroutine
time: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 26 | 0 | ▶ | sub to { return shift->{'to'} } | ||||||||
|
Subroutine
to: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 27 | |||||||||||
| 28 | 0 | ▶ | sub toXML { | ||||||||
|
Subroutine
toXML: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 29 | 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 | 1; | |||||||||
| 40 | __END__ | ||||||||||