Condition Coverage

blib/lib/HTML/Tabulate.pm
Criterion Covered Total %
condition 186 307 60.5


and 3 conditions

line !l l&&!r l&&r condition
127 74 0 167 $type and $type ne 'SCALAR'
74 167 0 $type and $type ne 'SCALAR' and not $valid{$_} =~ /$type/
147 0 0 6 $type and $type ne 'SCALAR'
0 6 0 $type and $type ne 'SCALAR' and not $valid{$_} =~ /$type/
170 20 0 26 $type and $type ne 'SCALAR'
20 26 0 $type and $type ne 'SCALAR' and not $valid{$_} =~ /$type/
208 2 244 0 $hash2 and ref $hash2 ne 'HASH'
229 139 103 153 ref $$hash2{$key} eq 'HASH' and ref $$merge{$key} eq 'HASH'
267 0 31 0 $defn and ref $defn ne 'HASH'
270 27 4 0 $$defn{'table'} and not ref $$defn{'table'}
310 7 0 0 blessed $set and $set->can('Next')
7 0 0 blessed $set and $set->can('next')
0 1 0 ref $set and ref $set ne 'HASH'
1 0 0 ref $set and ref $set ne 'HASH' and $set->isa('Class::DBI')
349 0 0 0 not @col and $obj->columns('Essential')
355 0 0 6 ref $$defn{'fields'} and @{$$defn{'fields'};}
364 0 0 0 not @col and $set->columns('Essential')
421 0 0 1 ref $$defn{'fields'} eq 'ARRAY' and ref $add eq 'HASH'
527 105 1 1 $$self{'defn_t'}{'style'} eq 'across' and ref $$defn_t{'thtr'} eq 'HASH'
555 98 3 6 $$defn_t{'stripe'} and ref $$defn_t{'stripe'} ne 'ARRAY'
679 2270 3 6 $close and $xhtml
718 0 0 16 $DEFAULT_DEFN{$type} and ref $DEFAULT_DEFN{$type} eq 'HASH'
729 2 17 6 defined $$elt{'value'} and $$elt{'value'} =~ /^\s*\<.*\>\s*$/s
731 17 2 0 defined $$elt{'title'} and $$elt{'title'} =~ /^\s*\<.*\>\s*$/s
735 2 1 16 defined $$elt{'value'} and defined $$elt{'format'}
3 3 13 defined $$elt{'value'} and defined $$elt{'format'} and not ref $$elt{'format'}
740 2 1 3 defined $$elt{'value'} and defined $$elt{'format'}
3 0 3 defined $$elt{'value'} and defined $$elt{'format'} and ref $$elt{'format'} eq 'CODE'
767 0 294 27 defined $data and $data ne ''
294 20 7 defined $data and $data ne '' and substr($data, -1) ne "\n"
783 107 107 0 $post_table and ref $$defn_t{'caption'} ne 'HASH' || !$$defn_t{'caption'}{'type'} || $$defn_t{'caption'}{'type'} ne 'caption_caption'
7 0 100 ref $$defn_t{'caption'} eq 'HASH' and $$defn_t{'caption'}{'type'}
7 98 2 ref $$defn_t{'caption'} eq 'HASH' and $$defn_t{'caption'}{'type'} and $$defn_t{'caption'}{'type'} eq 'caption_caption'
2 107 0 not $post_table and (ref $$defn_t{'caption'} eq 'HASH' and $$defn_t{'caption'}{'type'} and $$defn_t{'caption'}{'type'} eq 'caption_caption')
812 7 0 1 $$cg{'cols'} and ref $$cg{'cols'}
7 0 1 $$cg{'cols'} and ref $$cg{'cols'} and ref $$cg{'cols'} eq 'ARRAY'
843 0 106 1 exists $$self{'defn_t'}{'table'} and not $$self{'defn_t'}{'table'}
851 0 106 1 exists $$self{'defn_t'}{'table'} and not $$self{'defn_t'}{'table'}
871 7 21 0 $ref and $ref ne 'CODE'
892 14 16 0 $ref and $ref ne 'CODE'
927 115 1407 108 $data ne '' and $$defn{'trim'}
932 115 1515 0 $data ne '' and $$fattr{'escape'} || !exists($$fattr{'escape'})
940 113 1487 30 $data ne '' and $$fattr{'link'}
944 1504 120 6 defined $$defn{'null'} and $data eq ''
963 389 0 2 $l eq '' and defined $$self{'defn_t'}{'null'}
1056 1454 37 175 exists $$fattr{'value'} and not ref $$fattr{'value'}
9 0 1482 ref $row and not $$fattr{'derived'}
1062 0 38 295 ref $row eq 'HASH' and exists $$row{$field}
1064 0 0 0 eval { do { $row->can($field) } } and $field ne 'delete'
1084 1454 175 37 exists $$fattr{'value'} and ref $$fattr{'value'}
1094 1584 82 0 not defined $value and exists $$fattr{'default'}
1200 1630 0 0 $fattr and $tx_attr
1222 1627 0 3 $tx_attr_extra and $$tx_attr_extra{$field}
1228 20 0 1610 $skip_count and ref $skip_count
20 0 1610 $skip_count and ref $skip_count and ref $skip_count eq 'SCALAR'
1286 9 3 1 $rownum == 0 and exists $$tr{'bgcolor'}
1292 0 4 5 $$stripe[$r]{'class'} and $$tr{'class'}
1382 418 0 3 ref $$defn_t{'tr'} eq 'CODE' and $row
1444 105 0 0 blessed $set and $set->can('Next')
105 0 0 blessed $set and $set->can('next')
1504 68 0 37 $$self{'defn_t'}{'labels'} and @fields
1524 3 0 0 $data_prepend && @$data_prepend
1535 101 1 3 $data_prepend and @$data_prepend
1607 2 0 0 blessed $set and $set->can('Next')
2 0 0 blessed $set and $set->can('next')
1704 0 107 0 ref $self and blessed $self
6 101 0 ref $self and blessed $self and $self->isa('HTML::Tabulate')
1712 17 0 90 ref $defn eq 'HASH' and keys %$defn

or 2 conditions

line l !l condition
203 246 0 shift() || {}
219 244 2 (caller 1)[3] || ''
266 29 2 shift() || {}
508 5 18 $$defn_t{'field_attr'}{$_} ||= {}
514 0 1 $$defn_t{'field_attr'}{$_} ||= {}
561 1 6 $$defn_t{'tbody'} ||= 1
565 1 2 $$defn_t{'tbody'} ||= 1
747 1 1 $$elt{'tag'} || 'h2'
793 2 0 $$defn_t{'caption'}{'format'} || ''
872 21 0 $row || {}
894 13 3 $row || {}
906 4 3 $row || {}
981 0 391 $$self{'defn_t'}{'label_attr'}{$field} ||= {}
982 0 391 $$self{'defn_t'}{'tfoot_attr'}{$field} ||= {}
983 0 391 $$self{'defn_t'}{'data_attr'}{$field} ||= {}
1114 0 6 $$fattr{'composite_join'} || ' '
1389 418 0 $tr ||= {}

or 3 conditions

line l !l&&r !l&&!r condition
129 167 0 74 $type or $valid{$_} =~ /SCALAR/
149 6 0 0 $type or $valid{$_} =~ /SCALAR/
158 92 31 0 $$self{'field_attr'} ||= $self->get_field_attributes
172 26 0 20 $type or $valid{$_} =~ /SCALAR/
412 7 0 100 not $$self{'defn_t'}{'fields'} or ref $$self{'defn_t'}{'fields'} ne 'ARRAY'
7 0 100 not $$self{'defn_t'}{'fields'} or ref $$self{'defn_t'}{'fields'} ne 'ARRAY' or not @{$$self{'defn_t'}{'fields'};}
479 90 17 0 $defn ||= $$self{'defn'}
726 23 2 294 defined $$elt{'value'} or defined $$elt{'title'}
783 7 98 2 ref $$defn_t{'caption'} ne 'HASH' || !$$defn_t{'caption'}{'type'} || $$defn_t{'caption'}{'type'} ne 'caption_caption'
932 0 1515 0 $$fattr{'escape'} || !exists($$fattr{'escape'})
1201 161 0 1469 not defined $row or $row eq 'thead'
1333 7 0 0 defined $value || defined $$self{'defn_t'}{'tbody_field_value'}
8 0 7 $value eq $$self{'defn_t'}{'tbody_field_value'} or not defined $value || defined $$self{'defn_t'}{'tbody_field_value'}
1379 5 0 33 $tr ||= $self->deepcopy($$defn_t{'tr_base'})
1406 2 449 0 $fields ||= $$self{'defn_t'}{'fields'}
1444 6 0 0 ref $set eq 'HASH' or eval { do { keys %$set } }
1446 0 0 0 $$self{'prefetch'} || &$set()
1451 0 0 0 $$self{'prefetch'} || eval { do { $set->First } } || $set->Next
1456 0 0 0 $$self{'prefetch'} || eval { do { $set->first } } || $set->next
1467 6 0 0 $$fields[0] || (sort keys %$set)[0]
1607 0 0 0 ref $set eq 'HASH' or eval { do { keys %$set } }
1613 0 0 0 eval { do { $set->First } } || $set->Next
1622 0 0 0 eval { do { $set->first } } || $set->next