| 1 | package Geo::Routing::Driver::Gosmore::Query; | ||||||||||||||||||||
| 2 | 1 | ▶ | BEGIN { | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 1 | $Geo::Routing::Driver::Gosmore::Query::AUTHORITY = 'cpan:AVAR'; | |||||||||||||||||||
| 4 | } | ||||||||||||||||||||
| 5 | 1 | ▶ | BEGIN { | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | 1 | $Geo::Routing::Driver::Gosmore::Query::VERSION = '0.11'; | |||||||||||||||||||
| 7 | } | ||||||||||||||||||||
| 8 | 1 | ▶ | use Any::Moose; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | 1 | ▶ | use warnings FATAL => "all"; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 1 | with 'Geo::Routing::Role::Query'; | |||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 1 | has fast => ( | |||||||||||||||||||
| 14 | is => 'ro', | ||||||||||||||||||||
| 15 | isa => 'Int', | ||||||||||||||||||||
| 16 | default => 1, | ||||||||||||||||||||
| 17 | documentation => '', | ||||||||||||||||||||
| 18 | ); | ||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 1 | has v => ( | |||||||||||||||||||
| 21 | is => 'ro', | ||||||||||||||||||||
| 22 | isa => 'Str', | ||||||||||||||||||||
| 23 | default => 'motorcar', | ||||||||||||||||||||
| 24 | documentation => '', | ||||||||||||||||||||
| 25 | ); | ||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | 0 | ▶ | sub query_string { | ||||||||||||||||||
|
Subroutine
query_string: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 28 | 0 | my ($self) = @_; | |||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | 0 | my %map = qw( | |||||||||||||||||||
| 31 | from_longitude flon | ||||||||||||||||||||
| 32 | from_latitude flat | ||||||||||||||||||||
| 33 | to_longitude tlon | ||||||||||||||||||||
| 34 | to_latitude tlat | ||||||||||||||||||||
| 35 | ); | ||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | 0 | my @atoms = qw(from_latitude from_longitude to_latitude to_longitude fast v); | |||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | my $query_string = join '&', map { | ||||||||||||||||||||
| 40 | 0 | ▶ | my $url_form = $map{$_} || $_; | ||||||||||||||||||
|
Condition0%0/3
$map{$_} || $_
MC/DC0%0/2
$map{$_} || $_
$map{$_}
$_
Truth table0%0/3
A || B
A= $map{$_}B= $_
| |||||||||||||||||||||
| 41 | 0 | sprintf "%s=%s", $url_form, $self->$_; | |||||||||||||||||||
| 42 | } grep { | ||||||||||||||||||||
| 43 | 0 | defined $self->$_; | |||||||||||||||||||
| 44 | } @atoms; | ||||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | 0 | return $query_string; | |||||||||||||||||||
| 47 | } | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 1 | 1; | |||||||||||||||||||