Condition Coverage

blib/lib/HTML/Form.pm
Criterion Covered Total %
condition 115 148 77.7


and 3 conditions

line !l l&&!r l&&r condition
71 31 1 2 ref $html and $html->can("content_charset")
118 57 8 1 exists $attr->{'id'} && exists $labels{$attr->{'id'}}
239 141 11 2 $type eq "file" and exists $attr->{'value'}
302 104 73 2 defined $no and $no < 1
315 0 3 1 not defined $$selector and $_->{'name'}
324 5 2 0 $type and $type ne $_->{'type'}
326 7 0 0 $no and $no != $c
340 0 14 5 not defined $$selector and $_->{'name'}
349 119 43 8 $type and $type ne $_->{'type'}
397 2 3 3 @v == 1 and ref $v[0]
511 7 0 0 $name and not $_->selected($name)
704 0 0 0 defined $_->{'name'} and length $_->{'name'}
0 0 0 defined $_->{'name'} and length $_->{'name'} and $_->{'name'} ne $opt
706 0 0 0 exists $self->{'current'} and $self->{'current'} == $i
737 18 4 2 $self->{'strict'} and $self->{'readonly'}
741 18 2 2 $self->{'strict'} and defined $n
20 0 2 $self->{'strict'} and defined $n and defined $new
2 1 1 $self->{'strict'} and defined $n and defined $new and length $new > $n
786 71 11 4 $type eq "radio" and delete $self->{'disabled'}
812 15 55 16 $type eq "option" and exists $self->{'multiple'}
834 17 27 11 $self->{'type'} eq "option" and not exists $self->{'current'}
875 9 20 50 defined $val and defined $_->{'value'}
29 31 19 defined $val and defined $_->{'value'} and $val eq $_->{'value'}
898 1 28 3 not defined $cur_ignorecase and $lc_val eq lc $_->{'name'}
920 6 19 7 $self->{'strict'} and $disabled
1005 1 0 1 defined $name && length $name

or 2 conditions

line l !l condition
131 53 13 delete $attr->{'type'} || 'text'
135 2 0 delete $attr->{'type'} || 'submit'
216 20 29 shift() || 'GET'
218 14 35 shift() || 'application/x-www-form-urlencoded'
333 72 101 $no ||= 1
823 61 9 $self->{'name'} || \(undef)
1041 0 13 $self->{'headers'} || []
1092 0 1 $self->{'keytype'} || 'rsa'

or 3 conditions

line l !l&&r !l&&!r condition
179 2 2 1 $tag eq "/form" or $tag eq "input"
4 0 1 $tag eq "/form" or $tag eq "input" or $tag eq "textarea"
2 0 1 $tag eq "/form" or $tag eq "input" or $tag eq "textarea" or $tag eq "select"
0 0 1 $tag eq "/form" or $tag eq "input" or $tag eq "textarea" or $tag eq "select" or $tag eq "keygen"
217 49 0 0 shift() || Carp::croak('No action defined')
389 0 135 51 not defined $n or $n ne $name
410 2 7 0 $err ||= $@
437 0 6 8 not defined $n or $seen{$n}++
790 2 13 71 $self->{'checked'} || $self->{'option_selected'}
813 3 3 10 $self->{'disabled'} ||= delete $self->{'option_disabled'}
845 10 4 32 $self->{'disabled'} || _menu_all_disabled(@{$$self{'menu'};})
875 51 1 8 defined $val || defined $_->{'value'}
19 8 52 defined $val and defined $_->{'value'} and $val eq $_->{'value'} or not defined $val || defined $_->{'value'}
885 14 7 20 not defined $cur or $disabled
954 4 1 2 $_->{'seen'} || $_->{'disabled'}
1048 0 1 13 $form->method ne "POST" or $form->enctype ne "multipart/form-data"
1061 2 0 11 defined $content or grep /^Content$/i, keys %headers
0 1 10 not defined $file or length $file == 0