Branch Coverage

blib/lib/Geo/Coder/List.pm
Criterion Covered Total %
branch 4 272 1.4


line true false branch
65 0 4 ref $_[0] eq 'HASH' ? :
67 1 3 if (not defined $class) { }
0 3 elsif (ref $class) { }
136 0 0 if (ref $_[0] eq 'HASH') { }
0 0 elsif (ref $_[0]) { }
0 0 elsif (@_ % 2 == 0) { }
148 0 0 if (not defined $location or length $location == 0)
157 0 0 if $self->{'debug'}
158 0 0 if (not wantarray and my $rc = $self->_cache($location))
159 0 0 if (ref $rc eq "ARRAY")
162 0 0 if (ref $rc eq "HASH")
172 0 0 if $self->{'debug'}
176 0 0 if (defined $self->_cache($location) and ref $self->_cache($location) eq "ARRAY" and my(@rc) = @{$self->_cache($location);})
177 0 0 if (scalar @rc)
180 0 0 if (ref $_ eq 'HASH') { }
0 0 elsif (ref $_ eq 'Geo::Location::Point') { }
181 0 0 if (defined $_->{'geometry'}{'location'}{'lat'}) { }
200 0 0 if $self->{'debug'}
201 0 0 if ($allempty)
204 0 0 wantarray ? :
212 0 0 if (ref $geocoder eq "HASH")
213 0 0 if (exists $geocoder->{'limit'} and defined(my $limit = $geocoder->{'limit'}))
214 0 0 if $self->{'debug'}
215 0 0 if ($limit <= 0)
220 0 0 if (my $regex = $geocoder->{'regex'})
221 0 0 if $self->{'debug'}
222 0 0 unless ($location =~ /$regex/)
233 0 0 if $self->{'debug'}
234 0 0 if (ref $geocoder eq 'Geo::GeoNames') { }
235 0 0 if $self->{'debug'}
236 0 0 unless defined $geocoder->username
242 0 0 if ($@)
257 0 0 if (scalar @rc == 0 or ref $rc[0] eq "HASH" and scalar keys %{$rc[0];} == 0 or ref $rc[0] eq "ARRAY" and scalar keys %{$rc[0][0];} == 0)
272 0 0 if (ref $l eq "ARRAY")
277 0 0 unless (defined $l)
290 0 0 if $self->{'debug'} >= 2
291 0 0 if ref $l eq "Geo::Location::Point"
292 0 0 if ref $l ne "HASH"
293 0 0 if ($l->{'error'}) { }
306 0 0 unless (defined $l->{'geometry'}{'location'}{'lat'})
308 0 0 if ($l->{'lat'} and defined $l->{'lon'}) { }
0 0 elsif ($l->{'BestLocation'}) { }
0 0 elsif ($l->{'point'}) { }
0 0 elsif ($l->{'latt'}) { }
0 0 elsif ($l->{'latitude'}) { }
0 0 elsif ($l->{'properties'}{'geoLatitude'}) { }
0 0 elsif ($l->{'results'}[0]{'geometry'}) { }
0 0 elsif ($l->{'RESULTS'}) { }
0 0 elsif (defined $l->{'result'}{'addressMatches'}[0]{'coordinates'}{'y'}) { }
0 0 elsif ($l->{'lat'}) { }
0 0 elsif ($l->{'features'}) { }
331 0 0 if (my $type = $l->{'local_type'})
339 0 0 if ($l->{'results'}[0]{'geometry'}{'location'}) { }
368 0 0 if (defined $lat and defined $long) { }
375 0 0 if ($l->{'standard'}{'countryname'})
380 0 0 if (defined $l->{'geometry'}{'location'}{'lat'})
381 0 0 if $self->{'debug'}
399 0 0 if (scalar @rc)
400 0 0 if $self->{'debug'}
401 0 0 if $self->{'debug'} >= 2
402 0 0 if (defined $rc[0])
403 0 0 if (wantarray)
416 0 0 if $self->{'debug'}
417 0 0 if (wantarray)
442 0 0 if (my $ua = shift())
445 0 0 if (ref $g eq "HASH")
447 0 0 unless (defined $geocoder)
469 0 0 if (ref $_[0] eq 'HASH') { }
0 0 elsif (ref $_[0]) { }
0 0 elsif (@_ % 2 == 0) { }
479 0 0 unless my $latlng = $params{'latlng'}
485 0 0 if ($latlng) { }
493 0 0 if (my $rc = $self->_cache($latlng))
499 0 0 if (ref $geocoder eq "HASH")
500 0 0 if (exists $geocoder->{'limit'} and defined(my $limit = $geocoder->{'limit'}))
501 0 0 if $self->{'debug'}
502 0 0 if ($limit <= 0)
509 0 0 if $self->{'debug'}
510 0 0 if (wantarray) { }
0 0 elsif (my $rc = $self->_cache($latlng) // $geocoder->reverse_geocode(%params)) { }
512 0 0 if (my(@locs) = $geocoder->reverse_geocode(%params))
513 0 0 if $self->{'debug'} >= 2
515 0 0 if (my $name = $loc->{'display_name'}) { }
0 0 elsif ($loc->{'city'}) { }
521 0 0 if (my $usa = $loc->{'usa'}) { }
523 0 0 if (my $staddress = $usa->{'usstaddress'})
524 0 0 if $name
527 0 0 if (my $city = $usa->{'uscity'})
528 0 0 if $name
531 0 0 if (my $state = $usa->{'state'})
532 0 0 if $name
535 0 0 if $name
539 0 0 if (my $staddress = $loc->{'staddress'})
540 0 0 if $name
543 0 0 if (my $city = $loc->{'city'})
544 0 0 if $name
547 0 0 if (my $state = $loc->{'prov'})
548 0 0 if $name
556 0 0 if (wantarray)
560 0 0 if (scalar $rc[0])
565 0 0 unless ref $rc
566 0 0 if $self->{'debug'} >= 2
567 0 0 if (my $name = $rc->{'display_name'}) { }
0 0 elsif ($rc->{'city'}) { }
573 0 0 if (my $usa = $rc->{'usa'}) { }
576 0 0 if (my $staddress = $usa->{'usstaddress'})
577 0 0 if $name
580 0 0 if (my $city = $usa->{'uscity'})
581 0 0 if $name
584 0 0 if (my $state = $usa->{'state'})
585 0 0 if $name
592 0 0 if (my $staddress = $rc->{'staddress'})
593 0 0 if $name
596 0 0 if (my $city = $rc->{'city'})
597 0 0 if $name
600 0 0 if (my $state = $rc->{'prov'})
601 0 0 if $name
643 0 0 if (my $value = shift())
647 0 0 if ($self->{'cache'})
649 0 0 if (ref $value eq 'ARRAY') { }
0 0 elsif (ref $value eq 'HASH') { }
651 0 0 if (ref $item eq "HASH")
653 0 0 unless ($self->{'debug'})
655 0 0 unless $k eq "geometry"
658 0 0 unless (defined $item->{'geometry'}{'location'}{'lat'})
659 0 0 if (defined $item->{'geometry'}) { }
671 0 0 unless (defined $duration)
677 0 0 unless ($self->{'debug'})
679 0 0 unless $k eq "geometry"
682 0 0 if (defined $value->{'geometry'}{'location'}{'lat'}) { }
0 0 elsif (defined $value->{'geometry'}) { }
697 0 0 if $self->{'debug'}
705 0 0 if (not defined $rc and $self->{'cache'})
708 0 0 if (defined $rc)
709 0 0 if (ref $rc eq "HASH")
710 0 0 unless (defined $rc->{'geometry'}{'location'}{'lat'})