Branch Coverage

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

line%coveragebranch
155100TFif (not defined $class) { }
100TFelsif (&blessed($class)) { }
156100TFif (scalar keys %{$params;} > 0)
232100TFunless defined $geocoder
309100TFif (not defined $location or length $location == 0)
315100TFunless ($params->{'location'} =~ /\D/)
325100TFif $self->{'debug'}
336100TFif (defined $cached)
338100TFref $cached eq 'ARRAY' ? :
34450TFunless ref $r
345100TFif ref $r eq "HASH"
350100TFunless (wantarray)
36050TFif $self->{'debug'}
37350TFif $self->{'debug'}
378100TFif (ref $r eq 'HASH') { }
50TFelsif (ref $r eq 'Geo::Location::Point') { }
379100TFif defined $r->{'geometry'}{'location'}{'lat'}
384100TFif $allempty
390100TFif (exists $self->{'locations'}{$location})
39250TFif (ref $stored and ref $stored eq "Geo::Coder::List::_NotFound")
39350TFif $self->{'debug'}
394100TFwantarray ? :
404100TFif (ref $geocoder eq "HASH")
406100TFif (exists $geocoder->{'limit'} and defined(my $limit = $geocoder->{'limit'}))
40750TFif $self->{'debug'}
408100TFif ($limit <= 0)
415100TFif (my $regex = $geocoder->{'regex'})
41750TFif $self->{'debug'}
418100TFunless ($location =~ /$regex/)
433100TFif $self->{'debug'}
434100TFif (ref $geocoder eq 'Geo::GeoNames') { }
43650TFif $self->{'debug'}
437100TFunless defined $geocoder->username
444100TFif ($@)
462100TFif (ref $geocoder eq "Geo::Coder::US::Census" and not defined $rc[0]{'result'}{'addressMatches'}[0]{'coordinates'}{'y'})
477100TFif (scalar @rc == 0 or ref $rc[0] eq "HASH" and scalar keys %{$rc[0];} == 0 or 0)
505100TFif (ref $l eq "ARRAY")
511100TFif (not defined $l or $l eq "")
526100TFunless ref $l
532100TFif $self->{'debug'} >= 2
537100TFif (ref $l eq "Geo::Location::Point")
541100TFif (not defined $l->{'geometry'}{'location'}{'lat'} and defined $l->{'lat'})
56450TFif ref $l ne "HASH"
566100TFif ($l->{'error'}) { }
580100TFunless (defined $l->{'geometry'}{'location'}{'lat'})
583100TFif (defined $l->{'lat'} and defined $l->{'lon'}) { }
100TFelsif ($l->{'BestLocation'}) { }
100TFelsif ($l->{'point'}) { }
100TFelsif (defined $l->{'latt'}) { }
100TFelsif (defined $l->{'latitude'}) { }
100TFelsif (defined $l->{'properties'}{'geoLatitude'}) { }
100TFelsif ($l->{'results'}[0]{'geometry'}) { }
100TFelsif ($l->{'RESULTS'}) { }
100TFelsif (defined $l->{'result'}{'addressMatches'}[0]{'coordinates'}{'y'}) { }
100TFelsif (defined $l->{'lat'}) { }
100TFelsif ($l->{'features'}) { }
607100TFif (my $type = $l->{'local_type'})
618100TFif ($l->{'results'}[0]{'geometry'}{'location'}) { }
645100TFif ($l->{'features'}[0]{'center'}) { }
100TFelsif ($l->{'features'}[0]{'geometry'}{'coordinates'}) { }
663100TFif (defined $lat and defined $long) { }
678100TFif ($l->{'standard'}{'countryname'})
683100TFif (defined $l->{'geometry'}{'location'}{'lat'})
686100TFif $self->{'debug'}
712100TFunless defined $good_result
715100TFif $self->{'debug'}
717100TFif ($self->{'debug'} >= 2)
72950TFif (defined $rc[0])
731100TFif (defined $rc[0]{'long'} and not defined $rc[0]{'lng'})
734100TFif (defined $rc[0]{'long'} and not defined $rc[0]{'lon'})
739100TFunless (defined $good_result->{'lat'} and defined $good_result->{'lng'})
744100TFif (wantarray)
75650TFif $self->{'debug'}
761100TFwantarray ? :
804100TFunless $ua
808100TFref $g eq 'HASH' ? :
810100TFunless defined $geocoder
819100TFif ($ua->can('clone') and $ua->can('agent')) { }
823100TF$version ? :
877100TFunless my $latlng = $params->{'latlng'}
885100TFif (my $rc = $self->_cache($latlng))
895100TFif (ref $geocoder eq "HASH")
896100TFif (exists $geocoder->{'limit'} and defined(my $limit = $geocoder->{'limit'}))
89750TFif $self->{'debug'}
898100TFif ($limit <= 0)
906100TFif $self->{'debug'}
908100TFif (wantarray) { }
919100TFif ($@ =~ /Unknown parameter.*latlng|latlng.*[Uu]nknown/s)
926100TFif ($@)
93950TFif $self->{'debug'} >= 2
942100TFif (my $name = $loc->{'display_name'}) { }
100TFelsif ($loc->{'city'}) { }
50TFelsif ($loc->{'features'}) { }
974100TFif ($@ =~ /Unknown parameter.*latlng|latlng.*[Uu]nknown/s)
981100TFif ($@)
995100TFunless defined $rc
996100TFunless (ref $rc)
1008100TFif $self->{'debug'} >= 2
1010100TFif (my $name = $rc->{'display_name'})
1023100TFif ($rc->{'city'})
103750TFif ($rc->{'features'})
1157100TFif (my $usa = $loc->{'usa'}) { }
1161100TF$name ? :
100TFif $usa->{'usstaddress'}
1163100TF$name ? :
100TFif $usa->{'uscity'}
116450TF$name ? :
100TFif $usa->{'state'}
116650TF$name ? :
1171100TF$name ? :
100TFif $loc->{'staddress'}
1172100TF$name ? :
100TFif $loc->{'city'}
117350TF$name ? :
100TFif $loc->{'prov'}
1215100TFif (scalar @_)
1219100TFdefined $value ? :
1224100TFif ($self->{'cache'})
1227100TFif (ref $value eq 'ARRAY') { }
100TFelsif (ref $value eq 'HASH') { }
1231100TFif (&blessed($item) and ref $item->{'geocoder'})
1235100TFunless ref $item eq "HASH"
1241100TFunless ($self->{'debug'})
1243100TFunless $k eq "geometry"
1247100TFunless (defined $item->{'geometry'}{'location'}{'lat'})
1267100TFunless ($self->{'debug'})
1269100TFunless $k eq "geometry"
1273100TFif (defined $value->{'geometry'}{'location'}{'lat'}) { }
50TFelsif (defined $value->{'geometry'}) { }
129450TFif (ref $value and ref $value->{'geocoder'})
1300100TFif $self->{'debug'}
1303100TFif (not defined $value) { }
100TFelsif (ref $self->{'cache'} eq 'HASH') { }
1321100TFif (not defined $rc and $self->{'cache'})
1322100TFif (ref $self->{'cache'} eq 'HASH') { }
1329100TFunless defined $rc
1332100TFif ref $rc and ref $rc eq "Geo::Coder::List::_NotFound"
1335100TFif (ref $rc eq "HASH")
1336100TFunless defined $rc->{'geometry'}{'location'}{'lat'}
13490TFif (my $logger = $self->{'logger'})
13520TFif ($self->{'debug'})
136150TFif (my $logger = $self->{'logger'}) { }
137250TFif (my $logger = $self->{'logger'}) { }