Branch Coverage

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


line true false branch
283 6 17934 unless $line =~ /\w/
303 0 18528 unless my($area, $district) = $outcode =~ /$REGEXES{'strict_partial_anchored_captures'}/
307 6168 12360 if length $district < 2
323 693 2979 $b eq ' ' ? :
536 3672 $a eq ' ' ? :
377 0 61 @_ > 1 ? :
378 33 28 $pc =~ /$REGEXES{'valid_anchored'}/ ? :
381 0 61 @_ > 1 ? :
382 51 10 $pc =~ /$REGEXES{'strict_anchored'}/ ? :
385 0 61 @_ > 1 ? :
386 60 1 $pc =~ /$REGEXES{'lax_anchored'}/ ? :
431 1 3605 unless %OUTCODES
433 1202 1202 $$options{'strict'} ? :
1202 2404 $$options{'valid'} ? :
438 1803 1803 if $$options{'case-insensitive'}
460 2203 1833 if $$options{'case-insensitive'}
462 1878 2158 $$options{'partial'} ? :
469 2401 1635 $area ? :
471 1635 2401 unless ($strict)
472 1070 565 if $$options{'strict'}
475 407 158 unless ($area, $district, $sector, $unit) = $string =~ /$REGEXES{"lax_$re"}/
479 0 2559 unless $unit or $$options{'partial'}
481 0 2559 unless defined $district
486 223 2336 if $$options{'valid'} and not $outcode_data
488 522 1814 $district =~ s/([A-Z])$// ? :
490 129 115 $sector ? :
2092 244 $unit ? :
493 2092 244 $unit ? :
1658 678 $outcode_data && $strict ? :
794 1542 $$outcode_data{'non_geographical'} ? :
264 2072 $outcode eq 'BF1' ? :
522 9 9 unless $options
4 14 unless my $parsed = $class->parse($string, {'partial', 1, %{{} unless $options;}})
547 2 0 $data ? :
562 0 1 unless $class->posttowns_lookup->{$posttown or ''}
586 3 2558 unless %OUTCODES
594 0 1 unless %POSTTOWNS