| line | % | coverage | branch |
| 357 | 100 | T | F | if (not defined $class) { } |
| 100 | T | F | elsif (&blessed($class)) { } |
| 358 | 100 | T | F | if (scalar keys %{$params;} > 0) |
| 374 | 100 | T | F | ref $_ eq 'HASH' ? : |
| 466 | 100 | T | F | unless defined $geocoder |
| 483 | 100 | T | F | unless (defined $HAVE_RULE) |
| 484 | 50 | T | F | eval {
do {
require Geo::Location::Predicate;
'Geo::Location::Predicate'->can('_valid_location') ? 1 : 0
}
} ? : |
| 486 | 50 | T | F | 'Geo::Location::Predicate'->can('_valid_location') ? : |
| 493 | 100 | T | F | Geo::Location::Predicate::_valid_location($location) ? : |
| 50 | T | F | if $HAVE_RULE |
| 495 | 0 | T | F | if ref $location |
| 496 | 0 | T | F | unless defined $location and length $location |
| 606 | 50 | T | F | unless (defined $params) |
| 617 | 100 | T | F | if ref $location eq "SCALAR" |
| 620 | 100 | T | F | if (not defined $location or length $location == 0) |
| 629 | 100 | T | F | unless (ref $location) |
| 638 | 100 | T | F | unless (_could_be_a_location($location)) |
| 639 | 100 | T | F | ref $location ? : |
| 661 | 100 | T | F | if (defined $cached and not ref $cached) |
| 665 | 100 | T | F | if (defined $cached) |
| 667 | 100 | T | F | ref $cached eq 'ARRAY' ? : |
| 673 | 50 | T | F | unless ref $r |
| 674 | 100 | T | F | if ref $r eq "HASH" |
| 679 | 100 | T | F | unless (wantarray) |
| 707 | 100 | T | F | if (ref $r eq 'HASH') { } |
| 50 | T | F | elsif (ref $r eq 'Geo::Location::Point') { } |
| 708 | 100 | T | F | if defined $r->{'geometry'}{'location'}{'lat'} |
| 713 | 100 | T | F | if $allempty |
| 719 | 100 | T | F | if (exists $self->{'locations'}{$location}) |
| 721 | 50 | T | F | if (ref $stored and ref $stored eq "Geo::Coder::List::_NotFound") |
| 723 | 100 | T | F | wantarray ? : |
| 733 | 100 | T | F | if (ref $geocoder eq "HASH") |
| 737 | 100 | T | F | if (my $regex = $geocoder->{'regex'}) |
| 739 | 100 | T | F | unless ($location =~ /$regex/) |
| 745 | 100 | T | F | if (exists $geocoder->{'limit'} and defined(my $limit = $geocoder->{'limit'})) |
| 747 | 100 | T | F | if ($limit <= 0) |
| 764 | 100 | T | F | if (ref $geocoder eq 'Geo::GeoNames') { } |
| 766 | 100 | T | F | unless defined $geocoder->username |
| 773 | 100 | T | F | if ($@) |
| 791 | 100 | T | F | if (ref $geocoder eq "Geo::Coder::US::Census" and not defined $rc[0]{'result'}{'addressMatches'}[0]{'coordinates'}{'y'}) |
| 808 | 100 | T | F | ref $_ eq 'ARRAY' ? : |
| 811 | 100 | T | F | if (scalar @rc == 0 or ref $rc[0] eq "HASH" and scalar keys %{$rc[0];} == 0) |
| 833 | 100 | T | F | if (not defined $l or $l eq "") |
| 848 | 100 | T | F | unless ref $l |
| 854 | 100 | T | F | if $self->{'debug'} >= 2 |
| 859 | 100 | T | F | if (ref $l eq "Geo::Location::Point") |
| 863 | 100 | T | F | if (not defined $l->{'geometry'}{'location'}{'lat'} and defined $l->{'lat'}) |
| 886 | 50 | T | F | if ref $l ne "HASH" |
| 888 | 100 | T | F | if ($l->{'error'}) { } |
| 902 | 100 | T | F | unless (defined $l->{'geometry'}{'location'}{'lat'}) |
| 905 | 100 | T | F | if (defined $l->{'lat'} and defined $l->{'lon'}) { } |
| 100 | T | F | elsif ($l->{'BestLocation'}) { } |
| 100 | T | F | elsif ($l->{'point'}) { } |
| 100 | T | F | elsif (defined $l->{'latt'}) { } |
| 100 | T | F | elsif (defined $l->{'latitude'}) { } |
| 100 | T | F | elsif (defined $l->{'properties'}{'geoLatitude'}) { } |
| 100 | T | F | elsif ($l->{'results'}[0]{'geometry'}) { } |
| 100 | T | F | elsif ($l->{'RESULTS'}) { } |
| 100 | T | F | elsif (defined $l->{'result'}{'addressMatches'}[0]{'coordinates'}{'y'}) { } |
| 100 | T | F | elsif (defined $l->{'lat'}) { } |
| 100 | T | F | elsif ($l->{'features'}) { } |
| 929 | 100 | T | F | if (my $type = $l->{'local_type'}) |
| 940 | 100 | T | F | if ($l->{'results'}[0]{'geometry'}{'location'}) { } |
| 967 | 100 | T | F | if ($l->{'features'}[0]{'center'}) { } |
| 100 | T | F | elsif ($l->{'features'}[0]{'geometry'}{'coordinates'}) { } |
| 985 | 100 | T | F | if (defined $lat and defined $long) { } |
| 1000 | 100 | T | F | if ($l->{'standard'}{'countryname'}) |
| 1008 | 100 | T | F | if (defined $l->{'geometry'}{'location'}{'lat'}) |
| 1015 | 100 | T | F | if (defined $l->{'geometry'}{'location'}{'lat'} and defined $l->{'geometry'}{'location'}{'lng'}) |
| 1043 | 100 | T | F | unless defined $good_result |
| 1048 | 100 | T | F | if ($self->{'debug'} >= 2) |
| 1056 | 50 | T | F | unless (defined $good_result->{'lat'} and defined $good_result->{'lng'}) |
| 1061 | 100 | T | F | if (wantarray) |
| 1079 | 100 | T | F | wantarray ? : |
| 1136 | 100 | T | F | unless $ua |
| 1140 | 100 | T | F | ref $g eq 'HASH' ? : |
| 1142 | 100 | T | F | unless defined $geocoder |
| 1151 | 100 | T | F | if ($ua->can('clone') and $ua->can('agent')) { } |
| 1155 | 100 | T | F | $version ? : |
| 1244 | 100 | T | F | unless my $latlng = $params->{'latlng'} |
| 1248 | 100 | T | F | if ref $latlng or not $latlng =~ /$LATLNG_RE/ |
| 1259 | 100 | T | F | if (defined(my $rc = $self->_cache($latlng))) |
| 1260 | 100 | T | F | if (ref $rc eq "ARRAY") |
| 1261 | 100 | T | F | wantarray ? : |
| 1272 | 100 | T | F | if (ref $geocoder eq "HASH") |
| 1273 | 100 | T | F | if (exists $geocoder->{'limit'} and defined(my $limit = $geocoder->{'limit'})) |
| 1275 | 100 | T | F | if ($limit <= 0) |
| 1285 | 100 | T | F | if (wantarray) { } |
| 1296 | 100 | T | F | if ($@ =~ /Unknown parameter.*latlng|latlng.*[Uu]nknown/s) |
| 1303 | 100 | T | F | if ($@) |
| 1316 | 50 | T | F | if $self->{'debug'} >= 2 |
| 1319 | 100 | T | F | unless defined $loc |
| 1323 | 100 | T | F | unless (ref $loc) |
| 1324 | 100 | T | F | if length $loc |
| 1327 | 100 | T | F | unless &reftype($loc) eq "HASH" |
| 1329 | 100 | T | F | if (my $name = $loc->{'display_name'}) { } |
| 100 | T | F | elsif ($loc->{'city'}) { } |
| 50 | T | F | elsif ($loc->{'features'}) { } |
| 1354 | 100 | T | F | unless scalar @rc |
| 1365 | 100 | T | F | if ($@ =~ /Unknown parameter.*latlng|latlng.*[Uu]nknown/s) |
| 1372 | 100 | T | F | if ($@) |
| 1386 | 100 | T | F | unless defined $rc |
| 1387 | 100 | T | F | unless (ref $rc) |
| 1399 | 100 | T | F | if $self->{'debug'} >= 2 |
| 1401 | 100 | T | F | if (my $name = $rc->{'display_name'}) |
| 1414 | 100 | T | F | if ($rc->{'city'}) |
| 1428 | 50 | T | F | if ($rc->{'features'}) |
| 1578 | 100 | T | F | if (my $usa = $loc->{'usa'}) { } |
| 1582 | 100 | T | F | $name ? : |
| 100 | T | F | if $usa->{'usstaddress'} |
| 1584 | 100 | T | F | $name ? : |
| 100 | T | F | if $usa->{'uscity'} |
| 1585 | 50 | T | F | $name ? : |
| 100 | T | F | if $usa->{'state'} |
| 1587 | 50 | T | F | $name ? : |
| 1592 | 100 | T | F | $name ? : |
| 100 | T | F | if $loc->{'staddress'} |
| 1593 | 100 | T | F | $name ? : |
| 100 | T | F | if $loc->{'city'} |
| 1594 | 50 | T | F | $name ? : |
| 100 | T | F | if $loc->{'prov'} |
| 1636 | 100 | T | F | if (scalar @_) |
| 1640 | 100 | T | F | defined $value ? : |
| 1645 | 100 | T | F | if ($self->{'cache'}) |
| 1652 | 100 | T | F | if (ref $value eq 'ARRAY') { } |
| 100 | T | F | elsif (ref $value eq 'HASH') { } |
| 1656 | 100 | T | F | unless ref $item eq "HASH" |
| 1658 | 100 | T | F | unless (_has_lat($item)) |
| 1663 | 100 | T | F | defined $item->{'geometry'} ? : |
| 1674 | 100 | T | F | if (_has_lat($l2value)) { } |
| 100 | T | F | elsif (defined $l2value->{'geometry'}) { } |
| 1692 | 100 | T | F | if $self->{'debug'} |
| 1695 | 100 | T | F | if (not defined $value) { } |
| 100 | T | F | elsif (ref $self->{'cache'} eq 'HASH') { } |
| 1703 | 100 | T | F | unless eval {
do {
$self->{'cache'}->set($key, $l2value, $duration);
1
}
} |
| 1717 | 100 | T | F | if (not defined $rc and $self->{'cache'}) |
| 1718 | 100 | T | F | if (ref $self->{'cache'} eq 'HASH') { } |
| 1725 | 100 | T | F | if $@ |
| 1729 | 100 | T | F | unless defined $rc |
| 1732 | 100 | T | F | if ref $rc and ref $rc eq "Geo::Coder::List::_NotFound" |
| 1735 | 100 | T | F | if (ref $rc eq "HASH") |
| 1736 | 100 | T | F | unless defined $rc->{'geometry'}{'location'}{'lat'} |
| 1752 | 100 | T | F | unless ref $item and &reftype($item) eq "HASH" |
| 1755 | 100 | T | F | if &blessed($item) |
| 1757 | 100 | T | F | if ref $copy->{'geocoder'} |
| 1760 | 100 | T | F | unless ($keep_all or &blessed($item)) |
| 1772 | 100 | T | F | unless ref $item->{'geometry'} eq "HASH" |
| 1773 | 100 | T | F | unless ref $item->{'geometry'}{'location'} eq "HASH" |
| 1774 | 100 | T | F | defined $item->{'geometry'}{'location'}{'lat'} ? : |
| 1784 | 100 | T | F | unless $message =~ /\n\z/ |
| 1786 | 100 | T | F | if (my $logger = $self->{'logger'}) |
| 1790 | 100 | T | F | if ($self->{'debug'}) |
| 1799 | 100 | T | F | if (my $logger = $self->{'logger'}) { } |
| 1810 | 100 | T | F | if (my $logger = $self->{'logger'}) { } |