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
5860TFunless my $latlng = $params->{'latlng'}
5900TFif ($latlng) { }
6010TFif (my $rc = $self->_cache($latlng))
6070TFif (ref $geocoder eq "HASH")
6080TFif (exists $geocoder->{'limit'} and defined(my $limit = $geocoder->{'limit'}))
6090TFif $self->{'debug'}
6100TFif ($limit <= 0)
6170TFif $self->{'debug'}
6180TFif (wantarray) { }
0TFelsif (my $rc = $self->_cache($latlng) // $geocoder->reverse_geocode(%{$params;})) { }
6200TFif (my(@locs) = $geocoder->reverse_geocode(%{$params;}))
6210TFif $self->{'debug'} >= 2
6230TFif (my $name = $loc->{'display_name'}) { }
0TFelsif ($loc->{'city'}) { }
0TFelsif ($loc->{'features'}) { }
6290TFif (my $usa = $loc->{'usa'}) { }
6310TFif (my $staddress = $usa->{'usstaddress'})
6320TFif $name
6350TFif (my $city = $usa->{'uscity'})
6360TFif $name
6390TFif (my $state = $usa->{'state'})
6400TFif $name
6430TFif $name
6470TFif (my $staddress = $loc->{'staddress'})
6480TFif $name
6510TFif (my $city = $loc->{'city'})
6520TFif $name
6550TFif (my $state = $loc->{'prov'})
6560TFif $name
6700TFunless ref $rc
6710TFif $self->{'debug'} >= 2
6720TFif (my $name = $rc->{'display_name'})
6760TFif ($rc->{'city'})
6790TFif (my $usa = $rc->{'usa'}) { }
6820TFif (my $staddress = $usa->{'usstaddress'})
6830TFif $name
6860TFif (my $city = $usa->{'uscity'})
6870TFif $name
6900TFif (my $state = $usa->{'state'})
6910TFif $name
6980TFif (my $staddress = $rc->{'staddress'})
6990TFif $name
7020TFif (my $city = $rc->{'city'})
7030TFif $name
7060TFif (my $state = $rc->{'prov'})
7070TFif $name
7130TFif ($rc->{'features'})
764100TFif (my $value = shift())
768100TFif ($self->{'cache'})
77050TFif (ref $value eq 'ARRAY') { }
50TFelsif (ref $value eq 'HASH') { }
7720TFif (ref $item eq "HASH")
7740TFunless ($self->{'debug'})
7760TFunless $k eq "geometry"
7790TFunless (defined $item->{'geometry'}{'location'}{'lat'})
7800TFif (defined $item->{'geometry'}) { }
7920TFunless (defined $duration)
79850TFunless ($self->{'debug'})
800100TFunless $k eq "geometry"
80350TFif (defined $value->{'geometry'}{'location'}{'lat'}) { }
0TFelsif (defined $value->{'geometry'}) { }
81850TFif $self->{'debug'}
81950TFif (ref $self->{'cache'} eq 'HASH') { }
0TFelsif (not ref $value) { }
830100TFif (not defined $rc and $self->{'cache'})
83150TFif (ref $self->{'cache'} eq 'HASH') { }
837100TFif (defined $rc)
83850TFif (ref $rc eq "HASH")
83950TFunless (defined $rc->{'geometry'}{'location'}{'lat'})