Branch Coverage

blib/lib/BankAccount/Validator/UK.pm
Criterion Covered Total %
branch 109 138 78.9


line true false branch
161 1 38 unless defined $sc
162 1 37 unless defined $an
165 0 35 unless length $sc == 6
166 0 35 unless length $an == 8
172 0 35 if scalar @{$_rules;} == 0
176 25 10 scalar @{$_rules;} > 1 ? :
180 1 44 if $_rule->{'ex'} == 8
182 2 5 if ($_rule->{'ex'} == 6 and $_account_number->{'a'} =~ /^[4|5|6|7|8]$/ and $_account_number->{'g'} == $_account_number->{'h'})
196 1 42 if ($_rule->{'ex'} == 7 and $_account_number->{'g'} == 9) { }
1 41 elsif ($_rule->{'ex'} == 8) { }
5 36 elsif ($_rule->{'ex'} =~ /^[2|9]$/) { }
5 31 elsif ($_rule->{'ex'} == 10) { }
0 31 elsif ($_rule->{'ex'} == 3) { }
10 21 elsif ($_rule->{'ex'} == 5) { }
204 1 4 if ($_rule->{'ex'} == 9) { }
3 1 elsif ($_account_number->{'a'} != 0) { }
208 2 1 if ($_account_number->{'g'} != 9) { }
1 0 elsif ($_account_number->{'g'} == 9) { }
220 3 2 if ($_ab eq '09' || $_ab eq '99' and $_account_number->{'g'} == 9)
227 0 0 if $_account_number->{'c'} =~ /^[6|9]$/
231 2 8 if exists $self->{'sort_code'}{$sc}
235 35 8 if ($_rule->{'mod'} =~ /MOD(\d+)/i) { }
8 0 elsif ($_rule->{'mod'} =~ /DBLAL/i) { }
242 43 0 if (defined $_status)
244 32 11 $_status->{'res'} eq 'PASS' ? :
249 34 9 if defined $_result
253 1 0 if defined $self->{'last_ex'} and $self->{'last_ex'} =~ /^6$/ and $self->{'multi_rule'}
278 1 0 if scalar @{$self->{'trace'};}
289 0 35 if $_rule->{'ex'} == 1
291 35 0 if ($_rule->{'mod'} =~ /MOD(\d+)/i)
294 0 210 if $self->{'debug'}
300 0 280 if $self->{'debug'}
305 1 34 if ($_rule->{'ex'} == 4) { }
6 28 elsif ($_rule->{'ex'} == 5 and $1 == 11) { }
21 7 elsif ($remainder == 0) { }
307 1 0 if ($remainder == $_gh)
316 2 4 if ($remainder == 0) { }
1 3 elsif ($remainder == 1) { }
317 2 0 if ($_account_number->{'g'} == 0) { }
341 2 1 if ($_account_number->{'g'} == $remainder) { }
365 1 6 if ($_rule->{'ex'} == 14) { }
366 1 0 if ($_account_number->{'h'} =~ /^[0|1|9]$/) { }
374 0 6 if $self->{'debug'}
380 0 8 if $self->{'debug'}
385 1 0 if ($remainder == 0) { }
425 2 6 if $_rule->{'ex'} == 1
436 2 6 if ($_rule->{'ex'} == 1) { }
4 2 elsif ($_rule->{'ex'} == 5) { }
1 1 elsif ($remainder == 0) { }
437 1 1 if ($remainder == 0) { }
453 1 3 if ($remainder == 0) { }
454 1 0 if ($_account_number->{'h'} == 0)
464 2 1 if ($_account_number->{'h'} == $remainder) { }
499 3 87 if ($data =~ /\,/) { }
512 33 10 if ($self->{'multi_rule'}) { }
513 12 21 if (defined $self->{'last_ex'} and $self->{'last_ex'} =~ /^2|10|12$/ and $self->{'last_check'} == 1 or defined $self->{'last_ex'} and $self->{'last_ex'} =~ /^9|11|13$/ and $self->{'last_check'} == 1 and $self->{'attempt'} == 2) { }
5 16 elsif (defined $self->{'last_ex'} and $self->{'last_ex'} =~ /^5|6$/ and $self->{'last_check'} == 0) { }
3 13 elsif (defined $self->{'last_ex'} and $self->{'last_ex'} == 0 and $self->{'last_check'} == 1) { }
4 9 elsif ($self->{'attempt'} == 2) { }
547 0 35 unless defined $sc and $sc =~ /^\d+$/
551 60 38965 if $sc >= $_->{'start'} and $sc <= $_->{'end'}
560 33 79 if ($_total > 9) { }
575 1 36 unless $sc =~ /^\d+$/
576 1 35 unless $an =~ /^\d+$/
578 0 35 if (length $an == 10) { }
0 35 elsif (length $an == 9) { }
0 35 elsif (length $an == 7) { }
0 35 elsif (length $an == 6) { }
579 0 0 if ($an =~ /^(\d+)\-(\d+)/) { }