Condition Coverage

File:blib/lib/Geo/Coder/Free/Local.pm
Coverage:46.6%

line%coveragecondition
74100
Adec
00
11
Params::Get::get_params(undef, \@_) || {}
152100
ABdec
0X0
100
111
scalar @_ and scalar(@_) % 2 == 0
23467
ABdec
000
011
1X1
$location =~ /USA?$/ or $location =~ /United States$/
23533
ABdec
000
011
1X1
$self->{'ap'}{'us'} // "Lingua::EN::AddressParse"->new("country", "US", "auto_clean", 1, "force_case", 1, "force_post_code", 0)
23867
ABdec
000
011
1X1
$self->{'ap'}{'gb'} // "Lingua::EN::AddressParse"->new("country", "GB", "auto_clean", 1, "force_case", 1, "force_post_code", 0)
2430
ABdec
000
011
1X1
$self->{'ap'}{'ca'} // "Lingua::EN::AddressParse"->new("country", "CA", "auto_clean", 1, "force_case", 1, "force_post_code", 0)
2480
ABdec
000
011
1X1
$self->{'ap'}{'au'} // "Lingua::EN::AddressParse"->new("country", "AU", "auto_clean", 1, "force_case", 1, "force_post_code", 0)
32967
ABdec
0X0
100
111
uc $row->{'state'} eq uc $addr{'state'} and uc $row->{'country'} eq uc $addr{'country'}
35333
ABdec
0X0
100
111
not $location =~ /\sCounty,/i and my $href = 'Geo::StreetAddress::US'->parse_location($l) || 'Geo::StreetAddress::US'->parse_address($l)
33
ABdec
000
011
1X1
'Geo::StreetAddress::US'->parse_location($l) || 'Geo::StreetAddress::US'->parse_address($l)
36667
ABdec
0X0
100
111
$href->{'type'} and my $type = &Geo::Coder::Free::_abbreviate($href->{'type'})
40133
ABdec
0X0
100
111
$street and not $href->{'number'}
486100
ABdec
0X0
100
111
$location =~ /.+,.+,.*England$/ and not $location =~ /.+,.+,.+,.*England$/
49433
ABdec
0X0
100
111
require Geo::Address::Parser and "Geo::Address::Parser"->import
52633
ABdec
0X0
100
111
$libpostal_is_installed == 1 and my(%addr) = Geo::libpostal::parse_address($location)
5270
ABdec
0X0
100
111
$addr{'house_number'} and not $addr{'number'}
5300
ABdec
0X0
100
111
$addr{'house'} and not $addr{'name'}
5370
ABCdec
0XX0
10X0
1100
1111
defined $addr{'state'} and not defined $addr{'country'} and $addr{'state'} eq "england"
5420
ABCdec
0XX0
1000
1011
11X1
$addr{'country'} and $addr{'state'} || $addr{'state_district'}
62567
ABdec
0X0
100
111
$addr{'name'} and not defined $addr{'number'}
70967
ABdec
0X0
100
111
$match and $number_of_columns_matched >= 3
743100
ABdec
0X0
100
111
scalar @_ and scalar(@_) % 2 == 0
77467
ABdec
000
011
1X1
$latitude //= $params{'lat'}
77533
ABdec
000
011
1X1
$longitude //= $params{'lon'}
77667
ABdec
000
011
1X1
$longitude //= $params{'long'}
77967
ABdec
0X0
100
111
defined $latitude and defined $longitude
78633
ABdec
0X0
100
111
defined $row->{'latitude'} and defined $row->{'longitude'}
788100
ABdec
0X0
100
111
_equal($row->{'latitude'}, $latitude, 4) and _equal($row->{'longitude'}, $longitude, 4)
87967
ABdec
0X0
100
111
$char eq "," and not $in_quotes
893100
Adec
00
11
$values[$i] || ''
89740
ABCDdec
0XXX0
10XX0
110X0
11100
11111
$location{'latitude'} and $location{'longitude'} and $location{'latitude'} =~ /^-?\d+\.?\d*$/ and $location{'longitude'} =~ /^-?\d+\.?\d*$/