Condition Coverage

File:blib/lib/Geo/Coder/Free/OpenAddresses.pm
Coverage:2.8%

line%coveragecondition
10233
ABdec
000
011
1X1
ref $proto || $proto
10867
ABdec
0X0
100
111
-d $openaddr and -r $openaddr
1830
ABdec
0X0
100
111
$l = $self->geocode("location", $words[$offset]) and ref $l
1940
ABdec
0X0
100
111
$region and $region ne "US"
1950
ABdec
0X0
100
111
$l = $self->geocode("location", "$addr, US") and ref $l
2030
ABdec
0X0
100
111
$region and $region ne "CA"
2040
ABdec
0X0
100
111
$l = $self->geocode("location", "$addr, Canada") and ref $l
2120
ABdec
0X0
100
111
$region and $region ne "US"
2130
ABdec
0X0
100
111
$l = $self->geocode("location", "$addr, US") and ref $l
2230
ABdec
0X0
100
111
$region and $region ne "CA"
2240
ABdec
0X0
100
111
$l = $self->geocode("location", "$addr, Canada") and ref $l
2340
ABdec
0X0
100
111
not $region and ($l = $self->geocode("location", $addr) and ref $l)
0
ABdec
0X0
100
111
$l = $self->geocode("location", "$addr, $region") and ref $l
0
ABdec
0X0
100
111
$region and ($l = $self->geocode("location", "$addr, $region") and ref $l)
0
ABdec
0X0
100
111
$l = $self->geocode("location", $addr) and ref $l
2470
ABdec
0X0
100
111
$l = $self->geocode("location", $addr) and ref $l
3410
ABdec
000
011
1X1
$location =~ /USA$/ or $location =~ /United States$/
3420
ABdec
000
011
1X1
$$self{"ap"}{"us"} // "Lingua::EN::AddressParse"->new("country", "US", "auto_clean", 1, "force_case", 1, "force_post_code", 0)
3450
ABdec
000
011
1X1
$$self{"ap"}{"gb"} // "Lingua::EN::AddressParse"->new("country", "GB", "auto_clean", 1, "force_case", 1, "force_post_code", 0)
3480
ABdec
000
011
1X1
$$self{"ap"}{"ca"} // "Lingua::EN::AddressParse"->new("country", "CA", "auto_clean", 1, "force_case", 1, "force_post_code", 0)
3510
ABdec
000
011
1X1
$$self{"ap"}{"au"} // "Lingua::EN::AddressParse"->new("country", "AU", "auto_clean", 1, "force_case", 1, "force_post_code", 0)
4070
ABdec
0X0
100
111
$addr{"house_number"} and $param{"exact"}
4230
ABdec
0X0
100
111
not $location =~ /\sCounty,/i and my $href = 'Geo::StreetAddress::US'->parse_location($l) || 'Geo::StreetAddress::US'->parse_address($l)
0
ABdec
000
011
1X1
'Geo::StreetAddress::US'->parse_location($l) || 'Geo::StreetAddress::US'->parse_address($l)
4360
ABdec
0X0
100
111
$$href{"type"} and my $type = &Geo::Coder::Free::_abbreviate($$href{"type"})
5060
ABCdec
0000
0011
01X1
1XX1
uc $country eq "ENGLAND" or uc $country eq "SCOTLAND" or uc $country eq "WALES"
6070
ABdec
000
011
1X1
'Geo::StreetAddress::US'->parse_address($lookup) || 'Geo::StreetAddress::US'->parse_location($lookup)
7950
ABdec
0X0
100
111
$c eq "au" and length $state > 3
8270
ABdec
0X0
100
111
$street and $param{"exact"}
8680
ABdec
0X0
100
111
require Geo::Address::Parser and "Geo::Address::Parser"->import
8980
ABdec
0X0
100
111
$libpostal_is_installed == 1 and my(%addr) = Geo::libpostal::parse_address($location)
9000
ABCdec
0XX0
10X0
1100
1111
$addr{"country"} and $addr{"state"} and $addr{"country"} =~ /^(Canada|United States|USA|US)$/i
10020
ABdec
000
011
1X1
$$self{'openaddr_db'} || 'Geo::Coder::Free::DB::openaddresses'->new('cache', $$self{'cache'} || 'CHI'->new('driver', 'Memory', 'datastore', {}), 'directory', $$self{'openaddr'}, 'id', 'md5', 'no_entry', 1)
10070
ABdec
000
011
1X1
$$self{"geo_hash"} ||= "Geo::Hash"->new