Branch Coverage

File:blib/lib/Database/BI/Model/Boundary.pm
Coverage:98.9%

line%coveragebranch
340100TFunless my $level = $LEVELS{$level_name}
343100TFif defined $args->{'cache'} and not $args->{'cache'}->can('get') && $args->{'cache'}->can('set')
375100TFunless ref $ranks eq "HASH"
380100TFunless $code =~ /\A[A-Za-z]{2}\z/
382100TFunless defined $rank and not ref $rank and $rank =~ /\A[0-9]+\z/ and $ZOOM_FOR_RANK{$rank}
383100TFif exists $checked{lc $code}
411100TFunless defined $level->{'rank'}
413100TFdefined $country && !ref($country) && length $country ? :
443100TFref $self ? :
445100TFdefined $country && !ref($country) && length $country ? :
469100TFunless defined $level and not ref $level and $LEVELS{$level}
521100TFunless defined $lat and defined $lon and $lat =~ /\A-?[0-9]+(?:\.[0-9]+)?\z/ and $lon =~ /\A-?[0-9]+(?:\.[0-9]+)?\z/ and abs $lat <= 90 and abs $lon <= 180
567100TFunless ref $points eq "ARRAY"
569100TFexists $opt{'lookup'} ? :
575100TFunless ref $point eq "ARRAY"
577100TFif defined $key and not $seen{$key}++
586100TFif (not defined $status and $lookup)
587100TFif (not $self->_can_ask) { }
100TFelsif (not $failed and $counts{'attempted'} < $self->{'online_max'}) { }
592100TFif $status eq "failed"
595100TFif (not defined $status or $status eq "failed")
599100TFif ($status eq "nowhere")
603100TFunless $used{$osm}++
60950TFunless my $outline = $self->_get($self->_outline_key($osm))
617100TFref $outline->{'geometry'} ? :
625100TF$offline ? :
100TF$failed ? :
658100TFunless defined $key and not ref $key and $key =~ /\A(-?[0-9]{1,2}\.[0-9]{$DECIMALS}),(-?[0-9]{1,3}\.[0-9]{$DECIMALS})\z/ and defined $self->point_key($1, $2) and $self->point_key($1, $2) eq $key
668100TFif (not defined $status and $self->_can_ask)
673100TFif not defined $status or $status eq "failed"
675100TFif $status eq "nowhere"
678100TF$outline ? :
701100TFdefined $dir ? :
100TFunless defined $dir and not ref $dir and -d $dir
767100TF$detail eq $PLAIN_DETAIL ? :
778100TFdefined $country && !ref($country) ? :
779100TFif (defined $level->{'rank'})
790100TF$_->{'places'} ? :
796100TFif $rank >= $_->{'ranks'}[0]
100TF&first(sub {         $rank <= $_->{'ranks'}[1] if $rank >= $_->{'ranks'}[0]; } , @{$plan;}) ? :
807100TFref $index eq 'ARRAY' ? :
818100TFif (ref $remembered eq 'HASH') { }
100TFelsif (defined $remembered and length $remembered) { }
823100TFif defined $remembered->{'rank'} and $ZOOM_FOR_RANK{$remembered->{'rank'}}
825100TFif defined $sig and $sig eq _plan_sig($self->_plan($remembered->{'country'}))
827100TFif $self->_current($self->_get($self->_outline_key($remembered)))
835100TFif defined $_
100TFunless ref $entry eq "ARRAY" and 5 == grep({not ref $_ if defined $_;} @{$entry;}[0..4])
837100TFif $lat < $south or $lat > $north or $lon < $west or $lon > $east
839100TFunless $self->_current($outline) and _contains($outline->{'geometry'}, $lat, $lon)
852100TFunless ref $outline eq "HASH" and defined $outline->{'rank'}
853100TFunless ($outline->{'detail'} // "") eq $self->_detail
863100TFif (@set)
865100TFunless ($self->_get($key) // "") eq $set[0]
873100TFunless $self->{'online'}
874100TFif $self->{'ua'}
876100TFDatabase::BI::Model::Geocode::nominatim_ua() ? :
900100TFunless my $first = &$reverse($plan->[0]{'zoom'})
902100TFref $first->{'address'} eq 'HASH' ? :
903100TFdefined $country && !ref($country) && $country =~ /\A[A-Za-z]{2}\z/ ? :
904100TFif (length $country)
911100TFdefined $first->{'error'} ? :
912100TFunless my $answer = &$reverse($try->{'zoom'})
918100TFunless ($reply)
928100TFunless defined $name and length $name
937100TFunless (grep {$_->[0] eq $osm;} @{$index;})
939100TFif ($box)
94250TFunless grep {$_->[0] eq $osm;} @{$stored;}
970100TFunless defined $reply->{'osm_id'} and $reply->{'osm_id'} =~ /\A[0-9]+\z/ and defined $rank and not ref $rank and $rank =~ /\A[0-9]+\z/ and $rank >= $try->{'ranks'}[0] and $rank <= $try->{'ranks'}[1] and ref $geometry eq "HASH" and ($geometry->{'type'} // "") =~ /\A(?:Multi)?Polygon\z/ and ref $geometry->{'coordinates'} eq "ARRAY"
975100TFunless $boundary or $place
977100TF$osm_type eq 'way' ? :
999100TFunless &blessed($res) and $res->can("is_success") and $res->is_success
1002100TFref $reply eq 'HASH' ? :
1009100TFunless ref $geometry eq "HASH" and ref $geometry->{'coordinates'} eq "ARRAY"
1010100TFif ($geometry->{'type'} // "") eq "Polygon"
1011100TFif ($geometry->{'type'} // "") eq "MultiPolygon"
1022100TFif not defined $south or $lat < $south
1023100TFif not defined $north or $lat > $north
1024100TFif not defined $west or $lon < $west
1025100TFif not defined $east or $lon > $east
1028100TFdefined $south ? :
1040100TFunless ref $polygon eq "ARRAY"
1042100TFunless _in_ring($outer, $lon, $lat)
1043100TFunless grep {_in_ring($_, $lon, $lat);} @holes
1054100TFunless ref $position eq "ARRAY" and @{$position;} >= 2
1055100TFdefined $position->[0] && defined $position->[1] && !ref($position->[0]) && !ref($position->[1]) ? :
1061100TFunless ref $ring eq "ARRAY" and @{$ring;} >= 3
1063100TFunless _is_position($ring->[-1])
1066100TFunless _is_position($position)
1068100TFif ($qy > $y != $py > $y and $x < ($px - $qx) * ($y - $qy) / ($py - $qy) + $qx)
1074100TF$inside ? :