Branch Coverage

blib/lib/CGI/Validate.pm
Criterion Covered Total %
branch 10 48 20.8


line true false branch
136 0 1 unless my(%exts) = @_
139 0 2 unless ref $sub eq 'CODE'
170 0 22 unless ($field)
173 22 0 $optional eq '=' ? :
177 0 22 unless $TYPES{$type}
181 0 22 unless $fields{$field}{'reference'} = $_[$arg + 1]
184 0 22 unless ref $fields{$field}{'reference'} eq 'SCALAR' or ref $fields{$field}{'reference'} eq 'ARRAY'
192 1 0 if ($CGI::Validate::Complete)
195 22 0 unless (exists $form{$field})
205 0 1 unless (exists $fields{$field})
207 0 0 unless ($CGI::Validate::IgnoreNonMatchingFields)
216 0 0 unless (scalar @{$form{$field};} or $fields{$field}{'optional'})
227 0 0 if (length $arg > 0) { }
231 0 0 unless ($fields{$field}{'type'}[1]($arg))
232 0 0 if (scalar @{$form{$field};} > 1) { }
239 0 0 unless ($fields{$field}{'optional'})
241 0 0 if (scalar @{$form{$field};} > 1) { }
249 0 0 if (ref $fields{$field}{'reference'} eq 'ARRAY') { }
257 0 0 if (%CGI::Validate::Missing or %CGI::Validate::Invalid or %CGI::Validate::Blank or %CGI::Validate::InvalidType) { }
274 0 0 if length $value > 0
281 0 0 if $value =~ /\w/
287 0 0 if $value =~ /^\d+$/
296 0 0 if $value =~ /^\d+.?\d*$/
304 0 0 if $value =~ /^\s*]+\@[^\@.<>]+(?:\.[^\@.<>]+)+>?\s*$/