Branch Coverage

blib/lib/DBIx/XHTML_Table.pm
Criterion Covered Total %
branch 66 200 33.0


line true false branch
31 0 2 if ref $_[$#_] eq 'HASH'
35 0 2 if (UNIVERSAL::isa($_[0], 'DBI::db')) { }
2 0 elsif (ref $_[0] eq 'ARRAY') { }
47 0 0 if $@
58 0 0 unless $self->{'dbh'}
63 0 0 UNIVERSAL::isa($sql, 'DBI::st') ? :
67 0 0 if $@
73 0 0 unless @{$self->{'rows'};}
75 0 0 if (exists $self->{'pk'})
78 0 0 if defined $self->{'pk_index'}
86 0 7 unless $self->{'rows'}
89 0 7 if ($no_ws)
93 0 7 if ($config and not ref $config) { }
7 0 elsif ($config) { }
100 7 0 if $config->{'no_indent'}
101 0 7 if ($config->{'no_whitespace'})
115 1 0 if (ref $attribs eq 'HASH') { }
116 0 1 unless defined $cols and length $cols
129 0 0 if (ref $cols->{'style'} eq 'HASH')
142 0 0 unless $self->{'rows'}
147 0 0 if (defined $self->{'fields_hash'}{$_}) { }
0 0 elsif (defined $self->{'fields_hash'}{lc $_}) { }
153 0 0 if (lc $k eq lc $_)
159 0 0 unless $key
168 0 1 unless $self->{'rows'}
173 1 0 if (defined $self->{'fields_hash'}{$_}) { }
0 0 elsif (defined $self->{'fields_hash'}{lc $_}) { }
179 0 0 if (lc $k eq lc $_)
185 0 1 unless $key
194 0 0 unless $self->{'colgroups'}
202 0 1 unless $self->{'rows'}
210 1 0 if (exists $self->{'fields_hash'}{$_}) { }
0 0 elsif (exists $self->{'fields_hash'}{lc $_}) { }
216 0 0 if (lc $k eq lc $_)
232 0 0 unless $self->{'rows'}
240 0 0 if (exists $self->{'fields_hash'}{$_}) { }
0 0 elsif (exists $self->{'fields_hash'}{lc $_}) { }
246 0 0 if (lc $k eq lc $_)
268 0 0 unless ref $colors eq 'ARRAY'
269 0 0 unless $#$colors >= 1
271 0 0 $myattrib ? :
287 0 0 unless ref $colors eq 'ARRAY'
288 0 0 unless $#$colors >= 1
293 0 0 if $#$colors > $#$cols
301 0 0 $myattrib ? :
313 1 0 if $nodup
316 0 1 if ($group =~ /^\d+$/) { }
1 0 elsif (exists $self->{'fields_hash'}{$group}) { }
0 0 elsif (exists $self->{'fields_hash'}{lc $group}) { }
326 0 0 if (lc $k eq lc $group)
341 0 2 unless $rep eq $new
353 0 0 $pk =~ /^\d+$/ ? :
354 0 0 if exists $self->{'rows'}
392 0 0 unless ref $config eq 'ARRAY'
395 0 0 unless ref $_ eq 'HASH'
399 0 0 unless defined $pos and $pos =~ /^\d+$/
400 0 0 if $pos > $max_pos
401 0 0 unless ref $data eq 'ARRAY'
452 7 0 $self->{'rows'} ? :
453 2 5 $self->{'totals'} ? :
467 0 7 if ($caption = $self->{'global'}{'caption'})
469 0 0 $self->{'encode_cells'} ? :
474 0 7 if ($attribs = $self->{'global'}{'colgroup'})
480 0 7 if $self->{'no_head'}
500 0 0 unless $self->{'colgroups'}
501 0 0 unless @cols = @{$self->{'colgroups'};}
522 4 10 if (my $sub = $self->{'map_head'}{$field}) { }
10 0 elsif (not $self->{'no_ucfirst'}) { }
530 2 12 if $self->{'encode_cells'}
546 3 4 exists $self->{'body_breaks'} ? :
573 0 14 if defined $self->{'pk_index'}
579 0 7 if (my $subtotals = shift @{$$self{'sub_totals'};})
591 6 8 if $group
604 0 28 unless defined $row->[$_]
607 4 24 if $self->{'encode_cells'}
610 0 28 $row->[$_] =~ /^\s+$/ ? :
618 3 25 $nodup && $index == $_ ? :
630 0 0 unless $row
641 0 0 if ($self->{'subtotals_mask'} and defined $sum) { }
645 0 0 defined $sum ? :
683 0 4 if ($self->{'totals_mask'} and defined $sum) { }
687 2 2 defined $sum ? :
703 4 0 if (ref $v eq 'HASH')
708 4 0 ref $v->{$_} eq 'ARRAY' ? :
712 0 4 if ref $v eq 'ARRAY'
713 4 0 unless $v =~ /^$/
715 92 0 defined $cdata ? :
721 25 0 unless $sub
732 2 0 if $row->[$_] =~ /^[-0-9\.]+$/
736 1 1 defined $totals{$_} ? :
758 0 3 if ref $ref eq 'ARRAY' and scalar @$ref < 1
759 0 3 unless defined $ref
760 3 0 unless ref $ref eq 'ARRAY'
761 0 3 $_ =~ /^\d+$/ ? :
767 58 4 unless $hash2
768 0 4 unless $hash1
792 0 2 unless ref $ref->[0] eq 'ARRAY'
793 0 2 $headers ? :
801 2 0 unless ($self->{'keep_alive'})
802 0 2 if defined $self->{'dbh'}