Branch Coverage

blib/lib/Text/ASCIITable.pm
Criterion Covered Total %
branch 141 244 57.7


line true false branch
87 0 14 defined $$self{'options'}{'reportErrors'} ? :
91 1 13 defined $$self{'options'}{'utf8'} ? :
107 0 0 $$self{'options'}{'chaining'} ? :
0 13 unless (defined $_[0])
108 10 3 if ref $_[0] eq 'ARRAY'
109 0 0 $$self{'options'}{'chaining'} ? :
0 13 unless (scalar @_ != 0)
110 0 0 $$self{'options'}{'chaining'} ? :
0 13 unless (scalar @{$$self{'tbl_rows'};} == 0)
117 14 25 if scalar @{$_;} > $max
124 13 0 if $max
127 1 12 $$self{'options'}{'chaining'} ? :
167 4 38 if ref $_[0] eq 'ARRAY'
168 0 0 $$self{'options'}{'chaining'} ? :
0 42 if (scalar @_ > scalar @{$$self{'tbl_cols'};} and ref $_[0] ne 'ARRAY')
171 1 41 if (scalar @_ > 0 and ref $_[0] eq 'ARRAY')
175 1 0 $$self{'options'}{'chaining'} ? :
185 0 121 unless defined $_[$c]
188 4 117 if ($width > 0) { }
199 140 17 defined @{$_;}[$num] && $self->count(@{$_;}[$num]) ? :
209 3 38 $$self{'options'}{'chaining'} ? :
240 0 0 $$self{'options'}{'chaining'} ? :
0 1 unless (scalar @{$$self{'tbl_rows'};} > 0)
242 0 1 if (defined $row and ref $row eq 'ARRAY') { }
0 1 elsif (defined $row) { }
250 0 0 $$self{'options'}{'chaining'} ? :
0 0 if ($row < 0 or $row > scalar @{$$self{'tbl_rows'};})
256 0 1 $$self{'options'}{'chaining'} ? :
262 0 0 $$self{'options'}{'chaining'} ? :
0 4 unless (defined $col)
276 0 0 $$self{'options'}{'chaining'} ? :
0 0 unless (defined $col and defined $direction or defined $col and ref $col eq 'HASH')
277 0 0 $$self{'options'}{'chaining'} ? :
0 0 unless (defined &find($col, $$self{'tbl_cols'}) or defined $col and ref $col eq 'HASH')
279 0 5 if (ref $col eq 'HASH') { }
281 0 0 $$self{'options'}{'chaining'} ? :
0 0 unless (defined &find($_, $$self{'tbl_cols'}))
287 0 5 $$self{'options'}{'chaining'} ? :
299 0 0 $$self{'options'}{'chaining'} ? :
0 0 unless (defined $col and defined $direction)
300 0 0 $$self{'options'}{'chaining'} ? :
0 0 unless (defined &find($col, $$self{'tbl_cols'}))
303 0 0 $$self{'options'}{'chaining'} ? :
318 0 0 $$self{'options'}{'chaining'} ? :
0 1 unless (defined $col and defined $width)
319 0 0 $$self{'options'}{'chaining'} ? :
0 1 unless (defined &find($col, $$self{'tbl_cols'}))
320 0 0 $$self{'options'}{'chaining'} ? :
0 1 unless (scalar @{$$self{'tbl_rows'};} == 0)
323 0 1 $strict ? :
325 0 1 $$self{'options'}{'chaining'} ? :
337 0 458 unless defined find($colname, $$self{'tbl_cols'})
350 0 92 if (defined $$self{'tbl_width_strict'}{$colname} and $$self{'tbl_width_strict'}{$colname} == 1 and int $$self{'tbl_width'}{$colname} > 0) { }
363 24 6 unless defined $$self{'options'}{'headingText'}
366 4 2 if ($headingwidth > $tablewidth)
374 2 10 if ($antall < $extrasome)
392 12 26 unless (defined $$self{'cache_TableWidth'})
402 0 55 unless (defined $stop)
403 55 0 defined $line ? :
404 55 0 defined $delim ? :
412 55 118 if $i == 0
413 55 118 if $i == scalar(@{$$self{'tbl_cols'};}) - 1
417 118 55 if $i != scalar(@{$$self{'tbl_cols'};}) - 1
530 0 5 if (ref $name eq 'HASH') { }
550 1 2 if ($running_width + $column_width >= $$self{'options'}{'outputWidth'}) { }
562 0 2 unless (defined $$self{'options'}{'outputWidth'})
564 0 2 if $self->getTableWidth < $$self{'options'}{'outputWidth'}
565 1 1 if scalar @{$$self{'tbl_cuts'};} < 1
572 0 5 unless (defined $text)
578 0 5 if ($tablewidth - 4 < $self->count($text) and $opt eq 'title') { }
584 0 5 $$self{'options'}{'allowHTML'} || $$self{'options'}{'allowANSI'} || $$self{'options'}{'cb_count'} ? :
595 0 85 unless (defined $row)
604 29 218 if ($isheader != 1 and defined $$self{'tbl_align'}{@{$$self{'tbl_cols'};}[$i]}) { }
57 161 elsif ($isheader == 1) { }
607 0 29 $$self{'options'}{'allowHTML'} || $$self{'options'}{'allowANSI'} || $$self{'options'}{'cb_count'} ? :
615 6 51 $$self{'options'}{'allowHTML'} || $$self{'options'}{'allowANSI'} || $$self{'options'}{'cb_count'} ? :
620 18 143 $$self{'options'}{'allowHTML'} || $$self{'options'}{'allowANSI'} || $$self{'options'}{'cb_count'} ? :
627 162 85 if $i != scalar(@{$row;}) - 1
811 131 14 unless $page > 0
814 0 14 if scalar @{$$self{'tbl_cuts'};} < 1
823 1 17 defined $top ? :
824 1 17 defined $toprow ? :
825 1 17 defined $middle ? :
826 1 17 defined $middlerow ? :
827 1 17 defined $bottom ? :
828 0 18 defined $rowline ? :
829 2 16 defined $page ? :
834 17 1 unless $$self{'options'}{'hide_FirstLine'}
835 3 15 if (defined $$self{'options'}{'headingText'})
837 2 1 if ($title =~ /\n/) { }
845 3 0 unless $$self{'options'}{'hide_HeadLine'}
848 17 1 unless ($$self{'options'}{'hide_HeadRow'})
854 17 1 unless $$self{'options'}{'hide_HeadLine'}
859 1 0 if ($$self{'options'}{'drawRowLine'} and $$self{'tbl_rowline'}{$i} and $i != scalar @{$$self{'tbl_rows'};} or defined $$self{'tbl_lines'}{$i} and $$self{'tbl_lines'}{$i} and $i != scalar @{$$self{'tbl_rows'};} and $i != scalar @{$$self{'tbl_rows'};})
864 17 1 unless $$self{'options'}{'hide_LastLine'}
875 0 993 if (defined $$self{'options'}{'cb_count'} and ref $$self{'options'}{'cb_count'} eq 'CODE') { }
0 1986 elsif (defined $$self{'options'}{'cb_count'} and ref $$self{'options'}{'cb_count'} ne 'CODE') { }
877 0 0 unless $@
878 0 0 if ($@)
884 51 942 if $$self{'options'}{'allowHTML'}
885 51 942 if $$self{'options'}{'allowANSI'}
886 51 942 if $$self{'options'}{'allowANSI'}
887 993 0 if $$self{'options'}{'utf8'}
896 215 73 if ($dir =~ /auto/i)
897 35 180 if ($text =~ /^-?\d+([.,]\d+)*[%\w]?$/) { }
903 0 288 if (ref $dir eq 'CODE') { }
79 209 elsif ($dir =~ /right/i) { }
192 17 elsif ($dir =~ /left/i) { }
0 17 elsif ($dir =~ /justify/i) { }
17 0 elsif ($dir =~ /center/i) { }
905 0 0 if $@
912 63 16 if $strict
918 164 28 if $strict
923 0 0 if $strict
924 0 0 if ($self->count($text) < $length - ($visuallen - $reallen))
930 0 0 if (scalar @tmp)
939 0 0 if ($modulus)
952 6 11 if $left != int $left and $left > 0.4
955 7 10 if $strict
985 0 3 if (scalar @list > scalar @{$$self{'tbl_cols'};})
999 0 464 unless defined $_[1]
1000 464 482 if @{$_[1];}[$_] eq $_[0]