Branch Coverage

File:blib/lib/Geo/Coder/List.pm
Coverage:23.4%

line%coveragebranch
79100TFif (not defined $class) { }
100TFelsif (&Scalar::Util::blessed($class)) { }
8050TFif (scalar keys %{$params;} > 0)
14550TFunless defined $geocoder
17350TFif (not defined $location or length $location == 0)
17950TFunless ($params->{'location'} =~ /\D/)
18650TFif $self->{'debug'}
189100TFif (not wantarray and my $rc = $self->_cache($location))
19050TFif (ref $rc eq "ARRAY")
19350TFif (ref $rc eq "HASH")
20450TFif $self->{'debug'}
2080TFif (defined $self->_cache($location) and ref $self->_cache($location) eq "ARRAY" and my(@rc) = @{$self->_cache($location);})
2090TFif (scalar @rc)
2120TFif (ref $_ eq 'HASH') { }
0TFelsif (ref $_ eq 'Geo::Location::Point') { }
2130TFif (defined $_->{'geometry'}{'location'}{'lat'}) { }
2360TFif $self->{'debug'}
2370TFif ($allempty)
2400TFwantarray ? :
24850TFif (ref $geocoder eq "HASH")
2490TFif (exists $geocoder->{'limit'} and defined(my $limit = $geocoder->{'limit'}))
2500TFif $self->{'debug'}
2510TFif ($limit <= 0)
2560TFif (my $regex = $geocoder->{'regex'})
2570TFif $self->{'debug'}
2580TFunless ($location =~ /$regex/)
26950TFif $self->{'debug'}
27050TFif (ref $geocoder eq 'Geo::GeoNames') { }
2710TFif $self->{'debug'}
2720TFunless defined $geocoder->username
278100TFif ($@)
29350TFif (ref $geocoder eq "Geo::Coder::US::Census" and not defined $rc[0]{'result'}{'addressMatches'}[0]{'coordinates'}{'y'})
30750TFif (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)
322100TFif (ref $l eq "ARRAY")
327100TFif (not defined $l or $l eq "")
34150TFif $self->{'debug'} >= 2
34250TFif ref $l eq "Geo::Location::Point"
34350TFif ref $l ne "HASH"
34450TFif ($l->{'error'}) { }
357100TFunless (defined $l->{'geometry'}{'location'}{'lat'})
35950TFif ($l->{'lat'} and defined $l->{'lon'}) { }
0TFelsif ($l->{'BestLocation'}) { }
0TFelsif ($l->{'point'}) { }
0TFelsif ($l->{'latt'}) { }
0TFelsif ($l->{'latitude'}) { }
0TFelsif ($l->{'properties'}{'geoLatitude'}) { }
0TFelsif ($l->{'results'}[0]{'geometry'}) { }
0TFelsif ($l->{'RESULTS'}) { }
0TFelsif (defined $l->{'result'}{'addressMatches'}[0]{'coordinates'}{'y'}) { }
0TFelsif ($l->{'lat'}) { }
0TFelsif ($l->{'features'}) { }
3860TFif (my $type = $l->{'local_type'})
3960TFif ($l->{'results'}[0]{'geometry'}{'location'}) { }
4250TFif ($l->{'features'}[0]{'center'}) { }
0TFelsif ($l->{'features'}[0]{'geometry'}{'coordinates'}) { }
44350TFif (defined $lat and defined $long) { }
45550TFif ($l->{'standard'}{'countryname'})
46050TFif (defined $l->{'geometry'}{'location'}{'lat'})
46150TFif $self->{'debug'}
48050TFif (scalar @rc)
48150TFif $self->{'debug'}
48350TFif $self->{'debug'} >= 2
48450TFif (defined $rc[0])
48550TFif (defined $rc[0]{'long'} and not defined $rc[0]{'lng'})
48850TFif (defined $rc[0]{'long'} and not defined $rc[0]{'lon'})
49150TFunless (defined $rc[0]{'lat'} and defined $rc[0]{'lng'})
496100TFif (wantarray)
50950TFif $self->{'debug'}
51050TFif (wantarray)
5470TFunless $ua
5500TFref $g eq 'HASH' ? :
5510TFunless defined $geocoder
5700TFunless my $latlng = $params->{'latlng'}
5740TFif ($latlng) { }
5850TFif (my $rc = $self->_cache($latlng))
5910TFif (ref $geocoder eq "HASH")
5920TFif (exists $geocoder->{'limit'} and defined(my $limit = $geocoder->{'limit'}))
5930TFif $self->{'debug'}
5940TFif ($limit <= 0)
6010TFif $self->{'debug'}
6020TFif (wantarray) { }
0TFelsif (my $rc = $self->_cache($latlng) // $geocoder->reverse_geocode(%{$params;})) { }
6040TFif (my(@locs) = $geocoder->reverse_geocode(%{$params;}))
6050TFif $self->{'debug'} >= 2
6070TFif (my $name = $loc->{'display_name'}) { }
0TFelsif ($loc->{'city'}) { }
0TFelsif ($loc->{'features'}) { }
6130TFif (my $usa = $loc->{'usa'}) { }
6150TFif (my $staddress = $usa->{'usstaddress'})
6160TFif $name
6190TFif (my $city = $usa->{'uscity'})
6200TFif $name
6230TFif (my $state = $usa->{'state'})
6240TFif $name
6270TFif $name
6310TFif (my $staddress = $loc->{'staddress'})
6320TFif $name
6350TFif (my $city = $loc->{'city'})
6360TFif $name
6390TFif (my $state = $loc->{'prov'})
6400TFif $name
6540TFunless ref $rc
6550TFif $self->{'debug'} >= 2
6560TFif (my $name = $rc->{'display_name'})
6600TFif ($rc->{'city'})
6630TFif (my $usa = $rc->{'usa'}) { }
6660TFif (my $staddress = $usa->{'usstaddress'})
6670TFif $name
6700TFif (my $city = $usa->{'uscity'})
6710TFif $name
6740TFif (my $state = $usa->{'state'})
6750TFif $name
6820TFif (my $staddress = $rc->{'staddress'})
6830TFif $name
6860TFif (my $city = $rc->{'city'})
6870TFif $name
6900TFif (my $state = $rc->{'prov'})
6910TFif $name
6970TFif ($rc->{'features'})
737100TFif (my $value = shift())
741100TFif ($self->{'cache'})
74350TFif (ref $value eq 'ARRAY') { }
50TFelsif (ref $value eq 'HASH') { }
7450TFif (ref $item eq "HASH")
7470TFunless ($self->{'debug'})
7490TFunless $k eq "geometry"
7520TFunless (defined $item->{'geometry'}{'location'}{'lat'})
7530TFif (defined $item->{'geometry'}) { }
7650TFunless (defined $duration)
77150TFunless ($self->{'debug'})
773100TFunless $k eq "geometry"
77650TFif (defined $value->{'geometry'}{'location'}{'lat'}) { }
0TFelsif (defined $value->{'geometry'}) { }
79150TFif $self->{'debug'}
79250TFif (ref $self->{'cache'} eq 'HASH') { }
0TFelsif (not ref $value) { }
803100TFif (not defined $rc and $self->{'cache'})
80450TFif (ref $self->{'cache'} eq 'HASH') { }
810100TFif (defined $rc)
81150TFif (ref $rc eq "HASH")
81250TFunless (defined $rc->{'geometry'}{'location'}{'lat'})