Branch Coverage

blib/lib/Data/ShowTable.pm
Criterion Covered Total %
branch 203 310 65.4


line true false branch
345 0 0 unless $show_mode ne ''
347 0 0 if (/List/i) { }
0 0 elsif (/HTML/i) { }
0 0 elsif (/Table/i) { }
376 0 0 unless $databases ne ''
378 0 0 unless exists $$args{'titles'}
405 0 0 unless $tables ne ''
407 0 0 unless exists $$args{'titles'}
474 0 0 unless $col_names ne ''
475 0 0 unless $col_types ne ''
476 0 0 unless $col_lengths ne ''
477 0 0 unless $col_attributes ne ''
548 0 37 unless $titles ne ''
549 0 37 unless $types ne ''
550 0 37 unless $col_widths ne ''
551 0 37 unless $row_sub ne ''
552 35 2 if not defined $fmt_sub or $fmt_sub eq ''
553 17 20 if not defined $max_width or $max_width eq ''
576 170 0 $#$titles >= 0 && defined $$titles[$c] ? :
582 37 0 if ($#$titles >= 0)
655 0 37 unless $titles ne ''
656 0 37 unless $types ne ''
657 0 37 unless $col_widths ne ''
658 0 37 unless $row_sub ne ''
659 35 2 if not defined $fmt_sub or $fmt_sub eq ''
660 17 20 if not defined $max_width or $max_width eq ''
681 0 170 if $#$titles < 0
687 37 0 if $#$titles >= 0
855 0 49 unless $titles ne ''
856 0 49 unless $types ne ''
857 0 49 unless $col_widths ne ''
858 0 49 unless $row_sub ne ''
861 47 2 if not defined $fmt_sub or $fmt_sub eq ''
862 27 22 if not defined $max_width or $max_width eq ''
863 46 3 if not defined $url_keys or $url_keys eq ''
864 47 2 if not defined $title_formats or $title_formats eq ''
865 44 5 if not defined $data_formats or $data_formats eq ''
866 40 9 unless defined $no_escape
882 49 0 if defined $title_formats and $title_formats ne ''
884 49 0 if defined $data_formats and $data_formats ne ''
887 4 45 if ($table_attrs) { }
889 2 2 unless /\bBORDER=/i
890 3 1 unless /\bCELLPADDING=/i
891 3 1 unless /\bCELLSPACING=/i
897 230 0 defined $_ ? :
900 230 0 defined $$widths[$c] ? :
903 230 0 if ($#$titles >= 0)
904 10 220 if (($x = $#$tprefixes) >= 0)
905 8 2 $c > $x ? :
907 20 210 $no_escape ? :
908 10 220 if (($x = $#$tsuffixes) >= 0)
909 8 2 $c > $x ? :
923 1150 0 if (defined($val = $values[$c])) { }
926 710 440 if ($$types[$c] =~ /char|text|symbol|string/i) { }
927 650 60 unless $no_escape
938 2210 45 unless $key ne '' and defined $$url_keys{$key}
942 45 1105 if ($href ne '')
943 30 15 if ($href =~ /%K/)
947 45 0 if ($href =~ /%V/)
951 20 25 if ($href =~ /%I/)
962 125 1025 if (($x = $#$dprefixes) >= 0)
963 90 35 $c > $x ? :
966 125 1025 if (($x = $#$dsuffixes) >= 0)
967 90 35 $c > $x ? :
969 45 1105 if $href
1090 0 37 unless defined $titles and $titles ne ''
1091 0 37 unless defined $types and $types ne ''
1092 0 37 unless defined $col_widths and $col_widths ne ''
1093 0 37 unless defined $row_sub and $row_sub ne ''
1095 37 0 if not defined $fmt_sub or $fmt_sub eq ''
1096 17 20 if not defined $max_width or $max_width eq ''
1097 37 0 if not defined $wrap_margin or $wrap_margin eq ''
1105 37 0 $#$titles >= 0 ? :
1113 850 0 $#$titles >= 0 ? :
1119 21 850 if (length $value > ($cut = $col_limit)) { }
1121 21 0 if ($line =~ /([-,;? \t])([^-,;? \t]*)$/ and length $2 <= $wrap_margin)
1180 292 1752 if ($rewind_flag)
1184 292 1460 if $#{$columns[0];} < $$index_ref
1185 1460 0 if ($#columns == 0) { }
1187 1460 0 if (ref $data eq 'ARRAY') { }
0 0 elsif (ref $data eq 'HASH') { }
1273 0 6760 if not defined $max_width or $max_width eq ''
1274 0 6760 if not defined $width or $width eq ''
1276 1690 5070 if $max_width > 0
1277 0 6760 if ($type =~ /money/i) { }
1278 0 0 unless (($str = $value) =~ /[\$,]/)
1287 0 0 $prec > 2 ? :
0 0 if $prec > 0
1289 0 0 if $value < 0
1299 80 6680 if ($showmode =~ /html/i and $value =~ m[
1304 40 6720 if ($width > length &PlainText($str))
1306 0 40 if $type =~ /int|float|pct|real|numeric|money/i
1353 8153 0 if $#_ >= 0
1355 8073 80 unless m[
1474 0 160 unless my $argvref = shift()
1475 0 160 unless my $params = shift()
1476 0 160 unless my $arglist = shift()
1479 143 17 if ($#$argvref == 0 and ref $$argvref[0] eq 'HASH') { }
1484 663 11 if (exists $$params{$param})
1489 663 0 if ($var ne '')
1495 0 11 unless (exists $show_table_params{$param})
1504 4 127 unless defined $var
1508 127 0 if ($var ne '') { }
0 0 elsif (not exists $show_table_params{$param}) { }
1509 87 40 $i <= $#$argvref ? :
1522 457 883 if ($var ne '' and not exists $args{$param})
1614 9 0 if (($html, $elt) = /^(<)?\s*(\w+)/)
1615 0 9 if $formats{$elt}++ > 0
1616 9 0 unless $html
1618 9 0 unless $prefixes =~ />$/
1775 144 16 if ($#$widthspec >= 0) { }
1777 672 0 unless s/^.*\.(\d+)/$1/
1783 660 12 length $_ ? :
1803 132 28 if ($rewindable) { }
1806 132 0 if (ref $types eq 'ARRAY')
1814 0 660 if ($num_cols < 1 + $#values)
1827 612 2448 if ($setprec[$c])
1829 0 612 if ($prectype[$c]) { }
1831 0 0 if ($values[$c] =~ /\.(.*)$/)
1832 0 0 if length $1 > $precision[$c]
1845 0 0 $showmode eq 'html' ? :
3060 0 $fmt_sub ? :
1853 1108 1952 if $c > $#max_widths or $len > $max_widths[$c]
1859 82 50 unless defined $max_width and $max_width ne ''
1861 50 82 if ($max_width > 0)
1865 16 34 if $showmode eq 'box'
1866 16 34 if $showmode eq 'table'
1872 44 6 if ($max_width < $total)
1885 16 116 if ($#widths < 0) { }
1888 116 0 if $#widths >= 0
1892 0 544 unless defined $max_widths[$c]
1893 0 544 if $c > $#widths or not defined $widths[$c]
1896 348 196 if ($max_widths[$c] < $widths[$c]) { }
44 152 elsif ($expandable[$c] or not $widths[$c]) { }
98 108 elsif ($max_widths[$c] > $widths[$c] and $widths[$c] > 0) { }
1900 37 7 if $widths[$c] < $max_widths[$c]
1907 544 0 if ($c <= $#$titles)
1908 544 0 if (defined $$titles[$c]) { }
1910 181 363 $showmode eq 'html' ? :
1916 134 410 if $widths[$c] < $len
1918 134 410 if $max_widths[$c] < $len
1928 0 128 unless $c <= $#$titles
1930 32 96 $showmode eq 'html' ? :
1932 0 128 if $widths[$c] < $len
1977 3983 0 if (defined $v)
1979 100 3883 if not defined $cell_width or $cell_width == 0
1980 2353 1630 if ($cell_width <= length $text) { }
1988 548 587 if ($more ne '' and $v =~ /([-,;? \t])([^-,;? \t0-9]*)$/ and length $2 <= $List_Wrap_Margin)
2029 0 340 unless defined $width
2030 60 280 if length $string >= $width
2050 37 212 if $max < $_
2066 0 1690 if $min > $_
2105 0 935 unless defined $_
2110 75 860 if ($all)
2129 3121 920 unless $fmt =~ /\n$/