Branch Coverage

blib/lib/HTML/FormWizard.pm
Criterion Covered Total %
branch 82 314 26.1


line true false branch
189 1 1 if (scalar @_)
190 1 0 if (scalar(@_ + 1) % 2 and $_[0] =~ /^\-/) { }
194 1 0 if ($key =~ /^\-(\w+)/) { }
204 0 0 if $url
205 0 0 if $method
206 0 0 if $template
207 0 0 if $title
208 0 0 if $cgi
209 0 0 if $fields
213 2 0 unless $$self{'url'}
214 2 0 unless $$self{'method'}
215 2 0 unless $$self{'template'}
216 1 1 unless $$self{'title'}
217 2 0 unless $$self{'cgi'}
218 2 0 unless $$self{'fields'}
219 2 0 unless $$self{'actions'}
220 2 0 unless $$self{'encoding'}
241 0 3 unless $key =~ /^\-(\w+)/
275 8 0 if $$field{'name'}
276 6 2 if $$field{'description'}
278 0 8 unless $$field{'type'}
279 0 8 if ($$field{'type'} eq 'group') { }
0 8 elsif ($$field{'type'} eq 'radio' or $$field{'type'} eq 'list') { }
0 8 elsif ($$field{'type'} eq 'checkbox' or $$field{'type'} eq 'check' or $$field{'type'} eq 'mlist') { }
0 8 elsif ($$field{'type'} eq 'file') { }
280 0 0 if ($$field{'name'}) { }
281 0 0 unless validate($$field{'parts'}, $$data{lc $$field{'name'}})
284 0 0 unless validate($$field{'parts'}, $data)
287 0 0 if ($$field{'name'})
288 0 0 if ref $$data{lc $$field{'name'}}
290 0 0 if (my $rtype = ref $$field{'value'}) { }
292 0 0 if ($rtype eq 'ARRAY') { }
298 0 0 if $_ eq $$data{lc $$field{'name'}}
299 0 0 if $ok
304 0 0 if $$data{lc $$field{'name'}} and not $ok
305 0 0 if $$field{'needed'} and not $ok
309 0 0 if ($$field{'name'})
311 0 0 if (ref $$data{lc $$field{'name'}}) { }
312 0 0 if (my $rtype = ref $$field{'value'}) { }
314 0 0 if ($rtype eq 'ARRAY') { }
323 0 0 if $value eq $_
324 0 0 if $vok
326 0 0 unless $vok
327 0 0 unless $ok
334 0 0 if (my $rtype = ref $$field{'value'}) { }
336 0 0 if ($rtype eq 'ARRAY') { }
342 0 0 if $$data{lc $$field{'name'}} eq $_
343 0 0 if $ok
346 0 0 if $$data{lc $$field{'name'}} eq $$field{'value'}
350 0 0 unless $ok
353 0 0 unless $$data{lc $$field{'name'}} or not $$field{'needed'}
355 2 6 unless $$data{lc $$field{'name'}} or not $$field{'needed'}
356 0 6 if $$field{'minlen'} and length $$data{lc $$field{'name'}} < $$field{'minlen'} or $$field{'maxlen'} and length $$data{lc $$field{'name'}} > $$field{'maxlen'}
361 0 0 if (defined $$field{'datatype'} and defined $validators{$$field{'datatype'}} and $$data{lc $$field{'name'}})
365 0 0 if ($zbr)
370 3 3 if (defined $$field{'validate'})
372 2 1 if ($zbr)
416 2 6 unless $$field{'type'}
417 0 8 if ($$field{'type'} eq 'group') { }
419 0 0 if ($$field{'name'}) { }
427 8 0 if ($$field{'name'})
430 8 0 if (scalar @{$vals;} <= 1) { }
448 0 6 if ($$field{'type'} eq 'group') { }
0 6 elsif ($$field{'type'} eq 'radio' or $$field{'type'} eq 'list') { }
0 6 elsif ($$field{'type'} eq 'check' or $$field{'type'} eq 'checkbox' or $$field{'type'} eq 'mlist') { }
449 0 0 if ($$field{'name'}) { }
487 0 8 unless $$self{'fields'}
489 6 2 if ($$self{'cgi'} and $$self{'cgi'}->param)
490 2 4 if ($$self{'data'} = $self->getdata(@{$$self{'fields'};}) and validate($$self{'fields'}, $$self{'data'})) { }
515 0 7 unless $$self{'template'}
516 0 7 unless $$self{'method'}
517 0 7 unless $$self{'encoding'}
518 3 4 unless $$self{'erro'}
519 3 4 unless $$self{'fielderror'}
526 0 7 unless $$self{'fields'}
541 0 7 unless @_
548 7 0 unless $$button{'type'}
550 0 7 if ($$button{'type'} eq 'image') { }
0 7 elsif ($$button{'type'} eq 'reset') { }
569 0 0 unless $$button{'src'}
573 0 0 if $$button{'alt'}
585 0 0 if $$button{'value'}
597 0 7 if $$button{'value'}
607 3 4 unless $$self{'fielderror'}
611 3 4 unless $$field{'description'}
614 4 3 if $$field{'name'} eq $$self{'fielderror'}
615 1 6 unless $$field{'type'}
616 7 0 if ($$field{'type'} eq 'line') { }
0 0 elsif ($$field{'type'} eq 'passwd' or $$field{'type'} eq 'password') { }
0 0 elsif ($$field{'type'} eq 'check' or $$field{'type'} eq 'checkbox') { }
0 0 elsif ($$field{'type'} eq 'radio') { }
0 0 elsif ($$field{'type'} eq 'list') { }
0 0 elsif ($$field{'type'} eq 'mlist') { }
0 0 elsif ($$field{'type'} eq 'text') { }
0 0 elsif ($$field{'type'} eq 'file') { }
0 0 elsif ($$field{'type'} eq 'group') { }
0 0 elsif ($$field{'type'} eq 'hidden') { }
657 0 0 unless $$field{'title'}
661 0 0 unless $$field{'parts'}
673 0 0 unless $$field{'name'}
677 0 0 if $$field{'value'}
688 0 7 unless $$field{'name'}
694 0 7 if ($passwd) { }
699 3 4 if ($$field{'value'})
702 0 7 if ($$field{'size'})
705 0 7 if $$field{'maxlength'}
706 0 7 if ($$field{'maxlen'})
716 0 0 unless $$field{'name'}
722 0 0 if $$field{'mime'}
724 0 0 if $$field{'size'}
734 0 0 unless $$field{'name'}
740 0 0 if $$field{'cols'}
742 0 0 if $$field{'lines'}
743 0 0 if $$field{'rows'}
747 0 0 if $$field{'value'}
757 0 0 unless $$field{'name'}
761 0 0 if (not ref $$field{'value'}) { }
0 0 elsif (ref $$field{'value'} eq 'HASH') { }
0 0 elsif (ref $$field{'value'} eq 'ARRAY') { }
763 0 0 if $$field{'default'}
766 0 0 unless defined $$field{'cols'}
774 0 0 if $value eq $_
780 0 0 if ($col == $$field{'cols'})
788 0 0 unless defined $$field{'cols'}
795 0 0 if $value eq $_
801 0 0 if ($col == $$field{'cols'})
817 0 0 unless $$field{'name'}
821 0 0 if (ref $$field{'value'} eq 'HASH') { }
0 0 elsif (ref $$field{'value'} eq 'ARRAY') { }
823 0 0 if $$field{'size'}
828 0 0 if $value eq $_
836 0 0 if $$field{'size'}
841 0 0 if $value eq $_
856 0 0 unless $$field{'name'}
860 0 0 if (ref $$field{'value'} eq 'HASH') { }
0 0 elsif (ref $$field{'value'} eq 'ARRAY') { }
864 0 0 if $$field{'default'} eq $value
873 0 0 if $$field{'default'} eq $value
887 0 0 unless $$field{'name'}
891 0 0 if (not ref $$field{'value'}) { }
0 0 elsif (ref $$field{'value'} eq 'HASH') { }
0 0 elsif (ref $$field{'value'} eq 'ARRAY') { }
893 0 0 if $$field{'default'}
896 0 0 unless defined $$field{'cols'}
903 0 0 if $value eq $$field{'default'}
908 0 0 if ($col == $$field{'cols'})
912 0 0 if $col == $$field{'cols'}
917 0 0 unless defined $$field{'cols'}
923 0 0 if $value eq $$field{'default'}
928 0 0 if ($col == $$field{'cols'})
1026 4 2 if $erro
1028 0 6 if $field and not $erro
1033 6 0 if $meth
1034 6 0 if $encod
1064 4 2 if $needed
1065 4 2 if $errado
1151 5 2 if ($$self{'cgi'}) { }