Condition Coverage

blib/lib/HTML/Formulate.pm
Criterion Covered Total %
condition 138 191 72.2


and 3 conditions

line !l l&&!r l&&r condition
110 25 0 0 $$defn{'form'} and not ref $$defn{'form'}
133 24 0 1 $$defn{'formtype'} and $$defn{'formtype'} eq 'table'
234 67 6 8 $required and not ref $required
73 1 7 $required and not ref $required and $required =~ /^(ALL|NONE)$/
67 6 1 $required and not ref $required
235 0 0 6 $$defn_t{'fields'} and ref $$defn_t{'fields'} eq 'ARRAY'
245 67 0 14 $required and ref $required eq 'ARRAY'
253 4 20 57 exists $$defn_t{'fields'} and not exists $$defn_t{'submit'}
263 1 11 0 $error_messages and not $$self{'defn_t'}{'errors_where'} =~ /^(column|top)$/
292 1826 42 31 $$self{'defn_t'}{'use_name_as_id'} and $tag =~ qr/^(input|select|textarea)$/
1868 0 31 $$self{'defn_t'}{'use_name_as_id'} and $tag =~ qr/^(input|select|textarea)$/ and exists $$attr{'name'}
322 0 484 0 defined $$self{'defn_t'}{'null'} and $value eq $$self{'defn_t'}{'null'}
324 0 406 78 defined $value and $value eq ''
329 0 482 2 defined $$self{'defn_t'}{'null'} and defined $$fattr{'value'}
482 2 0 defined $$self{'defn_t'}{'null'} and defined $$fattr{'value'} and $$fattr{'value'} eq $$self{'defn_t'}{'null'}
357 4 0 4 @values == 1 && ref $values[0]
359 0 0 22 ref $values eq 'ARRAY' and @$values
411 4 0 6 @values == 1 && ref $values[0]
413 0 0 14 ref $values eq 'ARRAY' and @$values
432 0 0 0 defined $value && !ref($value) && defined $v && $v eq $value
503 2 2 2 $$fattr{'type'} and $$fattr{'type'} ne 'display'
519 348 148 0 $type and $type eq 'hidden'
534 21 372 4 ref $$self{'defn_t'}{'field_attr'}{-'submit'} eq 'HASH' and exists $$self{'defn_t'}{'field_attr'}{-'submit'}{'table'}
542 21 0 376 $$self{'defn_t'}{'field_attr'}{-'select'} and ref $$self{'defn_t'}{'field_attr'}{-'select'} eq 'HASH'
21 269 107 $$self{'defn_t'}{'field_attr'}{-'select'} and ref $$self{'defn_t'}{'field_attr'}{-'select'} eq 'HASH' and $$self{'defn_t'}{'field_attr'}{$field}{'type'}
269 96 11 $$self{'defn_t'}{'field_attr'}{-'select'} and ref $$self{'defn_t'}{'field_attr'}{-'select'} eq 'HASH' and $$self{'defn_t'}{'field_attr'}{$field}{'type'} and $$self{'defn_t'}{'field_attr'}{$field}{'type'} eq 'select'
550 21 0 376 $$self{'defn_t'}{'field_attr'}{-'submit'} and ref $$self{'defn_t'}{'field_attr'}{-'submit'} eq 'HASH'
21 281 95 $$self{'defn_t'}{'field_attr'}{-'submit'} and ref $$self{'defn_t'}{'field_attr'}{-'submit'} eq 'HASH' and $$self{'defn_t'}{'submit_hash'}{$field}
557 21 342 34 $$self{'defn_t'}{'field_attr'}{-'required'} and $$self{'defn_t'}{'field_attr'}{$field}{'required'}
563 21 354 22 $$self{'defn_t'}{'field_attr'}{-'errors'} and exists $$self{'defn_t'}{'errors'}{$field}
579 338 0 3 $$td_attr{'tr'} and ref $$td_attr{'tr'} eq 'HASH'
583 285 0 56 $$td_attr{'th'} and ref $$td_attr{'th'} eq 'HASH'
587 338 0 3 $$td_attr{'td'} and ref $$td_attr{'td'} eq 'HASH'
593 317 0 24 $$td_attr{'td_error'} and ref $$td_attr{'td_error'} eq 'HASH'
680 1 0 77 $fields and ref $fields eq 'ARRAY'
1 0 77 $fields and ref $fields eq 'ARRAY' and @$fields
747 64 6 5 $$defn{'errors_where'} and $$defn{'errors_where'} eq 'column'
821 77 5 6 $$self{'defn_t'}{'errors_where'} and $$self{'defn_t'}{'errors_where'} eq 'top'
838 2 0 2 exists $$self{'defn_t'}{'submit_table'} and $$self{'defn_t'}{'submit_table'} == 0
861 80 0 3 exists $$self{'defn_t'}{'submit_table'} and $$self{'defn_t'}{'submit_table'} == 0

or 2 conditions

line l !l condition
163 122 1069 $$self{'defn_t'}{$attr}{$field}{'type'} || ''
216 0 5 $$defn_t{'field_attr'}{$hidden} ||= {}
224 1 3 $$defn_t{'field_attr'}{$hidden} ||= {}
247 5 29 $$defn_t{'field_attr'}{$_} ||= {}
307 0 0 $$self{'defn_t'}{'field'}{$field} || {}
308 348 181 $$fattr{'type'} ||= 'text'
362 22 0 $$fattr{'vlabels'} || {}
416 14 0 $$fattr{'vlabels'} || {}
575 341 0 $td_attr ||= {}
576 242 99 $th_attr ||= {}
578 264 77 $$self{'defn_t'}{'tr'} || {}
622 121 160 $$fattr{'type'} || ''
648 0 239 $$th_attr{'colspan'} || 1
660 8 5 $$self{'defn_t'}{'errors'}{$field} || ' '
837 4 81 $$self{'defn_t'}{'submit_location'} || 'bottom'
860 4 81 $$self{'defn_t'}{'submit_location'} || 'bottom'

or 3 conditions

line l !l&&r !l&&!r condition
168 358 3 95 $TEXT_ATTR{$_} or $TEXTAREA_ATTR{$_}
361 0 95 $TEXT_ATTR{$_} or $TEXTAREA_ATTR{$_} or $SELECT_ATTR{$_}
176 266 0 72 not $type or $type eq 'text'
266 0 72 not $type or $type eq 'text' or $type eq 'password'
295 13 18 0 $$attr{'id'} ||= $$attr{'name'}
307 1007 0 0 $fattr ||= $$self{'defn_t'}{'field'}{$field} || {}
311 478 45 484 not defined $row or $$self{'defn_t'}{'formtype'} eq 'table'
523 0 484 not defined $row or $$self{'defn_t'}{'formtype'} eq 'table' or $$fattr{'composite'}
332 96 10 378 $$fattr{'type'} eq 'static' or $$fattr{'type'} eq 'display'
459 0 0 66 not defined $vlabel or $vlabel eq ''
736 3 96 0 $$fattr{'value'} || $$fattr{'label'} || join(' ', map({ucfirst $_;} split(/\s+/, $field, 0)))
899 77 0 4 $fields && ref $fields eq 'ARRAY' && @$fields || $submit && ref $submit eq 'ARRAY' && @$submit
926 0 0 90 ref $self eq 'HASH' or ref $self eq 'ARRAY'