Branch Coverage

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

line%coveragebranch
112100TFif (not defined $class) { }
100TFelsif (&Scalar::Util::blessed($class)) { }
11350TFif (scalar keys %{$params;} > 0)
126100TFunless ($alternatives)
144100TFif (not defined $$params{"openaddr"} and $ENV{"OPENADDR_HOME"})
148100TFif ($$params{"openaddr"})
151100TFif (my $cache = $$params{"cache"})
21250TFif (not ref $self) { }
50TFelsif (ref $self eq 'HASH') { }
50TFelsif (ref $_[0] eq 'HASH') { }
50TFelsif (ref $_[0]) { }
100TFelsif (scalar @_ and scalar(@_) % 2 == 0) { }
2130TFif (scalar @_) { }
0TFelsif (not defined $self) { }
0TFelsif ($self eq __PACKAGE__) { }
236100TFif (defined $params{'location'} and not $params{'location'} =~ /\D/) { }
100TFelsif (defined $params{'scantext'} and not $params{'scantext'} =~ /\D/) { }
237100TFif length $params{"location"}
24050TFif length $params{"scantext"}
24450TFif ($$self{"openaddr"})
2450TFif (my $scantext = $params{"scantext"})
2460TFif $$self{"scantext_misses"}{$scantext}
2530TFif (scalar @matches)
2600TFif ($params{"ignore_words"})
2700TF$region ? :
2710TFif $$self{"scantext_misses"}{$location}
2810TFif (scalar @res and not wantarray)
2850TFif (scalar @res) { }
2910TFif (scalar @rc)
2980TF$region ? :
2990TFif $$self{"scantext_misses"}{$location}
3090TFif (scalar @res and not wantarray)
3130TFif (scalar @res) { }
3190TFif (scalar @rc)
3330TFif defined $match and $match ne ""
3400TF$region ? :
3410TFif $$self{"scantext_misses"}{$location}
3510TFif (scalar @res and not wantarray)
3550TFif (scalar @res) { }
3610TFif (scalar @rc)
3660TFif ($region)
3670TFif ($region eq 'GB') { }
0TFelsif ($region eq 'US') { }
0TFelsif ($region eq 'Canada') { }
3700TFif (scalar @candidates)
3740TFif exists $ignore_words{lc $candidate}
3790TFif scalar @res
3810TFif scalar @gb
3860TFif (scalar @candidates)
3900TFif exists $ignore_words{lc $candidate}
3950TFif scalar @res
3970TFif scalar @us
4020TFif (scalar @candidates)
4060TFif exists $ignore_words{lc $candidate}
4110TFif scalar @res
4130TFif scalar @ca
4200TFif (wantarray) { }
4220TFif (scalar @rc)
4230TFif scalar @rc and $rc[0]
4280TFif scalar @rc and $rc[0]
4300TFif (my $rc = $$self{"openaddr"}->geocode(\%params))
4340TFif (my $rc = $$self{"local"}->geocode(\%params))
4380TFif (not $params{"scantext"} and my $alternatives = $$self{"alternatives"})
4420TFif ($location =~ /$key/)
4470TFif (my $rc = $self->geocode(\%params))
4510TFif ($value =~ /, /)
4570TFif (my $rc = $self->geocode(\%params))
467100TFif ($params{"location"})
46850TFif (wantarray)
474100TFunless ($params{"scantext"})
63250TFif (not ref $self) { }
50TFelsif (ref $self eq 'HASH') { }
50TFelsif (ref $_[0] eq 'HASH') { }
50TFelsif (ref $_[0]) { }
50TFelsif (scalar @_ and scalar(@_) % 2 == 0) { }
6330TFif (scalar @_) { }
0TFelsif (not defined $self) { }
0TFelsif ($self eq __PACKAGE__) { }
65650TFif ($$self{"openaddr"})
6570TFif (wantarray) { }
0TFelsif (my $rc = $$self{'openaddr'}->reverse_geocode(\%params)) { }
66550TFif ($params{"latlng"})
6660TFif (wantarray)
7040TFif ($ENV{'OPENADDR_HOME'}) { }
7100TFunless scalar @rc
72150TFif ($street =~ /(.+)\s+(.+)\s+(.+)/) { }
0TFelsif ($street =~ /(.+)\s(.+)$/) { }
72350TFif (lc $2 ne 'cross' and $a = $abbreviations->abbreviate($2)) { }
50TFelsif ($a = $abbreviations->abbreviate($3)) { }
7290TFif (my $a = $abbreviations->abbreviate($2))
74250TFif (my $rc = $abbreviations->abbreviate($type))