Branch Coverage

blib/lib/Test/FormValidator.pm
Criterion Covered Total %
branch 85 86 98.8


line true false branch
271 11 44 if @_
325 9 56 if @_
334 14 39 if (defined $prefix and $prefix ne '')
361 15 19 if (ref $_[0]) { }
363 5 10 if (@_)
372 2 32 unless $profile ||= $self->profile
395 1 2 unless (exists $$self{'__DFV_RESULTS'} and defined $$self{'__DFV_RESULTS'})
430 2 3 unless ($input and ref $input)
436 1 2 unless ($results)
462 2 3 unless ($input and ref $input)
468 1 2 if ($results)
495 2 10 if (not $fields or ref $fields ne 'ARRAY')
500 1 9 unless (defined $results)
508 2 7 unless ($success)
555 2 16 if (not $expected or ref $expected ne 'ARRAY' and ref $expected ne 'HASH')
560 1 15 unless (defined $results)
567 7 8 if (ref $expected eq 'ARRAY')
574 8 7 if (ref $expected eq 'HASH')
577 6 2 if (scalar keys %$expected == scalar keys %$invalid)
586 0 10 unless ref $constraints eq 'ARRAY'
587 7 3 unless ref $expected_constraints eq 'ARRAY'
593 2 8 unless (Test::More::eq_array($constraints, $expected_constraints))
601 4 11 unless ($success)
627 2 10 if (not $fields or ref $fields ne 'ARRAY')
632 1 9 unless (defined $results)
640 6 3 unless ($success)
741 9 7 if ($options and ref $options eq 'HASH')
743 8 1 if ($ignore)
744 1 7 if (ref $ignore eq 'ARRAY') { }
6 1 elsif (ref $ignore eq 'Regexp') { }
754 1 15 unless ($filename)
758 1 14 unless my $profile = $self->profile
763 1 13 unless ref $required eq 'ARRAY'
764 2 12 unless ref $optional eq 'ARRAY'
769 1 9 if (%ignore_list)
773 6 4 if ($ignore_match)
779 2 8 unless ($success)
790 4 11 unless my $p = 'HTML::TokeParser::Simple'->new($file)
794 22 451 if ($token->is_start_tag('input') or $token->is_start_tag('textarea') or $token->is_start_tag('select'))
870 1 17 unless (defined $results)
877 7 10 if ($results)
900 4 6 if ($missing)
903 7 3 if (@invalid_lines)