Branch Coverage

blib/lib/HTML/FormBuilder.pm
Criterion Covered Total %
branch 62 78 79.4


line true false branch
51 0 27 @args % 2 ? :
54 16 11 if ($args{'classes'}) { }
60 2 25 if (($args{'csrftoken'} // "") eq 1)
65 20 7 if $args{'data'}{'method'} ne "post"
84 0 26 if ref $_args ne "HASH"
117 1 1 unless $fieldset_index =~ /^\d+$/
122 1 0 if $fieldset_index > $#{$$self{"fieldsets"};}
146 0 16 if (defined $print_fieldset_index) { }
162 1 13 if ($fieldset_group ne "no-group")
170 1 13 if ($fieldset_group ne "no-group")
175 2 14 if ($self->csrftoken)
181 1 15 if ($self->after_form)
205 0 2 unless defined $data->{'input'}
215 0 2 if $input->{'type'} and $input->{'type'} eq "submit"
221 1 2 if ($self->csrftoken)
250 0 62 unless $field_id
253 2 60 unless $input_field
259 60 26 if ($_->{'id'} and $_->{'id'} eq $field_id)
260 13 47 if (eval {
36 11 elsif ($_->{'type'} =~ /(?:text|textarea|password|hidden|file)/i) { }
11 0 elsif ($_->{'type'} eq 'checkbox') { }
268 11 0 if $field_value eq $checkbox_value
288 2 86 unless $input_field
292 86 17 if ($input->{'id'} and $input->{'id'} eq $field_id)
293 13 73 if (eval {
296 0 73 unless $input->{'type'}
298 58 15 if ($input->{'type'} =~ /(?:text|textarea|password|hidden|file)/i) { }
11 8 elsif ($input->{'type'} eq 'checkbox' and $input->{'checked'} and $input->{'checked'} eq 'checked') { }
325 11 1 if ($input_field)
331 1 0 if ($error_field)
352 7 1 if $input_field
355 1 0 if $error_field
372 1 169 unless $field_id
377 164 525 if ($sub_input_field->{'id'} and $sub_input_field->{'id'} eq $field_id)
401 0 2 unless $error_id
406 2 14 if ($input_field->{'data'}{'error'}{'id'} and $input_field->{'data'}{'error'}{'id'} eq $error_id)
427 3 0 $args->{'class'} ? :
429 0 3 $args->{'id'} ? :
430 0 3 $args->{'id'} ? :