Branch Coverage

blib/lib/Geo/UK/Postcode/Regex.pm
Criterion Covered Total %
branch 65 74 87.8


line true false branch
285 8 23936 unless $line =~ /\w/
309 0 24728 unless my($area, $district) = $outcode =~ /$REGEXES{'strict_partial_anchored_captures'}/
311 8224 16504 if length $district < 2
330 957 4001 $b eq ' ' ? :
683 4958 $a eq ' ' ? :
381 0 61 @_ > 1 ? :
382 33 28 $pc =~ /$REGEXES{'valid_anchored'}/ ? :
385 0 61 @_ > 1 ? :
386 51 10 $pc =~ /$REGEXES{'strict_anchored'}/ ? :
389 0 61 @_ > 1 ? :
390 60 1 $pc =~ /$REGEXES{'lax_anchored'}/ ? :
435 1 3605 unless %OUTCODES
439 1202 1202 $options->{'strict'} ? :
1202 2404 $options->{'valid'} ? :
442 1803 1803 if $options->{'case-insensitive'}
464 2203 1837 if $options->{'case-insensitive'}
468 1878 2162 $options->{'partial'} ? :
473 2405 1635 $area ? :
475 1635 2405 unless ($strict)
476 1070 565 if $options->{'strict'}
479 407 158 unless ($area, $district, $sector, $unit) = $string =~ /$REGEXES{"lax_$re"}/
483 0 251 unless $unit or $options->{'partial'}
485 0 2563 unless defined $district
490 223 2340 if $options->{'valid'} and not $outcode_data
492 522 1818 $district =~ s/([A-Z])$// ? :
494 129 115 $sector ? :
2096 244 $unit ? :
509 2096 244 $unit ? :
1662 678 $outcode_data && $strict ? :
796 1544 $outcode_data->{'non_geographical'} ? :
264 2076 $outcode eq 'BF1' ? :
526 9 9 unless $options
4 14 unless my $parsed = $class->parse($string, {'partial', 1, %{{} unless $options;}})
551 2 0 $data ? :
566 0 1 unless $class->posttowns_lookup->{$posttown or ''}
590 5 5652 unless %OUTCODES
598 0 1 unless %POSTTOWNS