Branch Coverage

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

line%coveragebranch
155100TFif (not defined $class) { }
100TFelsif (&blessed($class)) { }
156100TFif (scalar keys %{$params;} > 0)
232100TFunless defined $geocoder
30550TFunless (defined $params)
313100TFif (not defined $location or length $location == 0)
319100TFunless ($params->{'location'} =~ /\D/)
329100TFif $self->{'debug'}
340100TFif (defined $cached)
342100TFref $cached eq 'ARRAY' ? :
34850TFunless ref $r
349100TFif ref $r eq "HASH"
354100TFunless (wantarray)
36450TFif $self->{'debug'}
37750TFif $self->{'debug'}
382100TFif (ref $r eq 'HASH') { }
50TFelsif (ref $r eq 'Geo::Location::Point') { }
383100TFif defined $r->{'geometry'}{'location'}{'lat'}
388100TFif $allempty
394100TFif (exists $self->{'locations'}{$location})
39650TFif (ref $stored and ref $stored eq "Geo::Coder::List::_NotFound")
39750TFif $self->{'debug'}
398100TFwantarray ? :
408100TFif (ref $geocoder eq "HASH")
410100TFif (exists $geocoder->{'limit'} and defined(my $limit = $geocoder->{'limit'}))
41150TFif $self->{'debug'}
412100TFif ($limit <= 0)
419100TFif (my $regex = $geocoder->{'regex'})
42150TFif $self->{'debug'}
422100TFunless ($location =~ /$regex/)
437100TFif $self->{'debug'}
438100TFif (ref $geocoder eq 'Geo::GeoNames') { }
44050TFif $self->{'debug'}
441100TFunless defined $geocoder->username
448100TFif ($@)
466100TFif (ref $geocoder eq "Geo::Coder::US::Census" and not defined $rc[0]{'result'}{'addressMatches'}[0]{'coordinates'}{'y'})
481100TFif (scalar @rc == 0 or ref $rc[0] eq "HASH" and scalar keys %{$rc[0];} == 0 or 0)
509100TFif (ref $l eq "ARRAY")
515100TFif (not defined $l or $l eq "")
530100TFunless ref $l
536100TFif $self->{'debug'} >= 2
541100TFif (ref $l eq "Geo::Location::Point")
545100TFif (not defined $l->{'geometry'}{'location'}{'lat'} and defined $l->{'lat'})
56850TFif ref $l ne "HASH"
570100TFif ($l->{'error'}) { }
584100TFunless (defined $l->{'geometry'}{'location'}{'lat'})
587100TFif (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'}) { }
611100TFif (my $type = $l->{'local_type'})
622100TFif ($l->{'results'}[0]{'geometry'}{'location'}) { }
649100TFif ($l->{'features'}[0]{'center'}) { }
100TFelsif ($l->{'features'}[0]{'geometry'}{'coordinates'}) { }
667100TFif (defined $lat and defined $long) { }
682100TFif ($l->{'standard'}{'countryname'})
687100TFif (defined $l->{'geometry'}{'location'}{'lat'})
690100TFif $self->{'debug'}
716100TFunless defined $good_result
719100TFif $self->{'debug'}
721100TFif ($self->{'debug'} >= 2)
73350TFif (defined $rc[0])
735100TFif (defined $rc[0]{'long'} and not defined $rc[0]{'lng'})
738100TFif (defined $rc[0]{'long'} and not defined $rc[0]{'lon'})
743100TFunless (defined $good_result->{'lat'} and defined $good_result->{'lng'})
748100TFif (wantarray)
76050TFif $self->{'debug'}
765100TFwantarray ? :
808100TFunless $ua
812100TFref $g eq 'HASH' ? :
814100TFunless defined $geocoder
823100TFif ($ua->can('clone') and $ua->can('agent')) { }
827100TF$version ? :
881100TFunless my $latlng = $params->{'latlng'}
889100TFif (my $rc = $self->_cache($latlng))
899100TFif (ref $geocoder eq "HASH")
900100TFif (exists $geocoder->{'limit'} and defined(my $limit = $geocoder->{'limit'}))
90150TFif $self->{'debug'}
902100TFif ($limit <= 0)
910100TFif $self->{'debug'}
912100TFif (wantarray) { }
923100TFif ($@ =~ /Unknown parameter.*latlng|latlng.*[Uu]nknown/s)
930100TFif ($@)
94350TFif $self->{'debug'} >= 2
946100TFif (my $name = $loc->{'display_name'}) { }
100TFelsif ($loc->{'city'}) { }
50TFelsif ($loc->{'features'}) { }
978100TFif ($@ =~ /Unknown parameter.*latlng|latlng.*[Uu]nknown/s)
985100TFif ($@)
999100TFunless defined $rc
1000100TFunless (ref $rc)
1012100TFif $self->{'debug'} >= 2
1014100TFif (my $name = $rc->{'display_name'})
1027100TFif ($rc->{'city'})
104150TFif ($rc->{'features'})
1161100TFif (my $usa = $loc->{'usa'}) { }
1165100TF$name ? :
100TFif $usa->{'usstaddress'}
1167100TF$name ? :
100TFif $usa->{'uscity'}
116850TF$name ? :
100TFif $usa->{'state'}
117050TF$name ? :
1175100TF$name ? :
100TFif $loc->{'staddress'}
1176100TF$name ? :
100TFif $loc->{'city'}
117750TF$name ? :
100TFif $loc->{'prov'}
1219100TFif (scalar @_)
1223100TFdefined $value ? :
1228100TFif ($self->{'cache'})
1231100TFif (ref $value eq 'ARRAY') { }
100TFelsif (ref $value eq 'HASH') { }
1235100TFif (&blessed($item) and ref $item->{'geocoder'})
1239100TFunless ref $item eq "HASH"
1245100TFunless ($self->{'debug'})
1247100TFunless $k eq "geometry"
1251100TFunless (defined $item->{'geometry'}{'location'}{'lat'})
1271100TFunless ($self->{'debug'})
1273100TFunless $k eq "geometry"
1277100TFif (defined $value->{'geometry'}{'location'}{'lat'}) { }
50TFelsif (defined $value->{'geometry'}) { }
129850TFif (ref $value and ref $value->{'geocoder'})
1304100TFif $self->{'debug'}
1307100TFif (not defined $value) { }
100TFelsif (ref $self->{'cache'} eq 'HASH') { }
1325100TFif (not defined $rc and $self->{'cache'})
1326100TFif (ref $self->{'cache'} eq 'HASH') { }
1333100TFunless defined $rc
1336100TFif ref $rc and ref $rc eq "Geo::Coder::List::_NotFound"
1339100TFif (ref $rc eq "HASH")
1340100TFunless defined $rc->{'geometry'}{'location'}{'lat'}
13530TFif (my $logger = $self->{'logger'})
13560TFif ($self->{'debug'})
136550TFif (my $logger = $self->{'logger'}) { }
137650TFif (my $logger = $self->{'logger'}) { }