Branch Coverage

blib/lib/SQL/Steno.pm
Criterion Covered Total %
branch 247 364 67.8


line true false branch
83 0 0 unless $dbh
88 0 0 unless my $info = $dbh->column_info(@$table)
101 0 0 unless $dbh
122 3 4 if (defined $render) { }
338 2 3 if ($type < 2)
339 2 0 unless $str =~ /_/u
340 0 0 $type ? :
343 2 1 if ($type < 4)
345 1 1 if $type == 2
355 42 13 if $ret
358 2 11 if $ret
359 2 11 if $ret
361 11 0 if ($list)
363 18 5 $type < @simple ? :
366 2 21 unless defined $expr
368 10 11 if (@res)
369 10 0 if @res == 1
377 1 0 if ord $prefix == 46 or ord $suffix == 40
391 0 5 unless (defined $quotes and "\\$quotes" =~ /^$quote_re$/ou)
392 0 0 $quotes ? :
402 18 22 if $list
403 10 30 unless defined $_
410 0 30 tr/\-// ? :
411 4 26 tr/ // ? :
413 17 13 unless $list
414 1 19 $space ? :
416 13 67 if ($noquote or $boolean and /^(?:true|false)$/iu or $null and /^null$/iu or $var and /^\@\w+$/u) { }
9 58 elsif ($number and /^[-+]?(?:0b[01]+|0x[\da-f]+|(?=\.?\d)\d*\.?\d*(?:e[-+]?\d+)?)$/iu) { }
425 49 1 unless ($space)
429 23 27 $split ? :
438 4 11 $ref ? :
440 11 4 unless $ref
443 4 11 if $ref
447 2 25 if ($4 and $4 > @arg) { }
450 11 14 $5 ? :
451 13 12 if $4
455 2 9 if (@arg > keys %seen)
462 6 0 $res[4] eq '>' ? :
5 6 $res[4] eq '*' ? :
1 13 $res[3] < 0 ? :
11 14 $res[4] ? :
473 33 0 unless @keys_Table_Columns
474 0 0 defined $2 ? :
0 0 $2 ? :
33 0 unless $error
476 2 31 unless ($table_re)
478 0 2 $table_re ? :
480 33 0 unless ($error)
486 0 1 defined $1 ? :
0 1 defined $3 ? :
0 1 $3 ? :
716 2 26 if s[:$quote_re?$perl_re][my(@ret) = map(($_ // 'NULL'), eval substr($4, 1, -1)); $error = 1, warn($@) if $@; "e($1, $2, $3, \@ret);]egou or s/(?:\b(\w+)|:)$quote_re\((.+?)\)/($1 ? "$1(" : '') . "e($2, $3, $4, $5) . ($1 ? ')' : '');/egu
718 0 7 if $@
725 3 5 $1 ? :
3 5 $1 ? :
735 5 87 if ($1 eq '\\') { }
76 11 elsif (not /\G$rq/cgu) { }
748 8 18 if s/:(${timespec_re}[+-]\d*$timespec_re(?(?<=\w)\b)|l?j\w+(?:#(\w*))|\w+)/&find($1, ':', '', \%Macros);/egou
752 18 0 unless my $was_column = /^\./u
755 18 0 unless $was_column
757 18 0 unless $error
760 0 18 if $error
763 0 18 if (s/^upd(?:a(?:t(?:e)?)?)?\b/update/iu) { }
764 0 0 if s/(?
767 18 0 unless s/^ins(?:e(?:r(?:t)?)?)?\b/insert/iu or s/^del(?:e(?:t(?:e)?)?)?\b/delete/iu
788 11 5 if (@_)
792 2 9 select() eq 'main::STDOUT' ? :
795 0 5 if (--$i <= 0 and $cnt < $total)
799 0 0 if (defined $i) { }
801 0 0 $i == 0 ? :
0 0 $i eq '*' ? :
0 0 0 == length $i ? :
819 5 1 if $_[2]
824 156 6 if (defined $_) { }
825 49 49 $tab ? :
49 98 $semi ? :
15 132 if /\A\Z/u or s/"/""/gu or $semi ? tr/\n;// : ($tab ? tr/\t\n// : tr/\n,//) or /\A=/u
835 6 6 $tab ? :
6 12 $semi ? :
837 6 15 unless @row = $sth->fetchrow_array
840 6 9 if $filter
856 1 12 exists $_[2]{'null'} ? :
0 13 exists $_[2]{'NULL'} ? :
2 13 exists $_[2]{'all'} ? :
15 2 if $_[2]
862 1 79 if $filter
864 4 576 if (not defined $res1[$i]) { }
537 39 elsif (not $res1[$i] =~ /^\d+(?:\.\d+)?$/u) { }
868 411 126 unless $crlf
871 215 322 unless ($date)
872 109 106 if ($res1[$i] =~ s/^(\d{4}-)($r1)-0[01]([T ]$r2:$r5(?::$r5(?:[.,]\d{3})?)?(?:Z|[+-]$r2:$r5)?)?$/$1/ou)
873 24 85 if $2 > 1
874 91 18 if $3
877 215 322 unless ($time)
878 170 45 if ($res1[$i] =~ s/^(\d{4}-(?:$r1-(?:$r3)?)?[T ])?($r2):($r5)(?::($r5)(?:([.,])(\d{3}))?)?(Z|[+-]$r2:$r5)?$/$1/ou)
880 49 121 if ($2 == 23 and $3 == 59 and ($4 // 59) == 59 and ($6 // 999) == 999) { }
24 97 elsif ($6 > 0) { }
12 85 elsif ($4 > 0) { }
12 73 elsif ($3 > 0) { }
891 84 86 if $7
897 10 570 if @txt < $i
899 184 396 if $len[$i] < $len
901 71 9 if (@comp) { }
903 62 447 if defined $comp[$i] and $comp[$i] ne $res1[$i]
910 9 8 if (@res)
911 1 8 if @res == 1
916 0 71 if (defined $comp[$i])
919 0 0 unless $more
930 9 62 if ($len[$i] < length $name[$i])
934 67 4 $txt[$i] ? :
937 8 1 if $name[-1]
942 1 79 if defined $count
959 25 13 @label ? :
2 52 if (not defined $_) { }
0 52 elsif (/^(?:y(?:es)?|no?|true|false|o(?:n|ff)|-?\.inf|\.nan)$/su) { }
15 37 elsif (Deparse error: Can't locate object method "unctrl" via package " " (perhaps you forgot to load " "?) at /usr/local/lib/perl5/5.22.0/B/Deparse.pm line 5058. or @label ? 0 : tr/\n//) { }
1 36 elsif (tr/\n//) { }
970 0 1 $nl ? :
972 36 18 if @label
974 4 2 if (@label) { }
975 4 0 if defined $count
979 16 2 $maxlen ? :
981 1 19 $1 ? :
984 7 11 if $maxlen < $length
989 2 5 unless @row = $sth->fetchrow_array
992 2 3 if $filter
997 0 0 unless my(@row) = $_[0]->fetchrow_array
999 0 0 $_[0]{'NAME'}[0] =~ /Function|Procedure/iu ? :
1000 0 0 if (@row > $col)
1002 0 0 if $_[0]{'NAME'}[0] =~ /View/iu
1013 0 13 if ($DBI::err || $t0->[0] - $lasttime > 3600 and not $dbh->ping)
1021 0 13 UNIVERSAL::isa($sql, 'DBI::st') ? :
13 0 if (my $sth = UNIVERSAL::isa($sql, 'DBI::st') ? $sql : $dbh->prepare($sql))
1026 13 0 if ($sth->{'Active'})
1027 4 9 if ($render) { }
1258 2 20 unless /\S/u
1259 1 19 if (s/^\s*\\\\\s*//u) { }
1272 20 0 if $echo
1274 3 33 if (s/^&$perl_re//u) { }
1277 0 3 if $@
1278 0 3 if (UNIVERSAL::isa($perl, 'DBI::st')) { }
1 2 elsif (defined $perl) { }
1288 18 15 unless s/^&(\.?\w+|-)(\(((?:(?>[^()]+)|(?2))*)\))/&convert_Query($1, $3);/eu or s/^&(\.?\w+|-) *(.*)/&convert_Query($1, $2);/eu
1295 3 6 if (defined $2) { }
1301 7 11 if ($filter)
1303 0 7 if $@
1305 5 13 if s/^\s*=//u
1308 3 10 if (/^\s*\?\s*(?:([?&#.:\\])(\w*)|(\w*)\()?/u)
1309 0 3 if ($1 and $1 eq '?') { }
1317 0 10 if (s/^\s*!//u)
1319 0 0 if ($? == -1) { }
0 0 elsif (my $exit = $? & 127) { }
1322 0 0 $? & 128 ? :
1330 0 10 if (/\A(>{1,2})\s*(.+?(\.\w+)?)(?:\((.*)\))?\s*\Z/u) { }
0 10 elsif (/\A\|(.+)\Z/u) { }
1331 0 0 $4 ? :
0 0 if $3
1343 2 8 unless $_ and &convert
1346 0 8 if $skip
1348 13 0 if $dbh
1351 0 13 if ($fh)
1366 0 0 if (@_)
1378 3 0 if ($_[0]) { }
1380 3 0 if $_ = &find
1383 0 0 if (my $sub = delete $hash{''})
1391 0 0 unless lc $a cmp lc $b
1392 0 0 unless $_[4]
1394 0 0 unless lc $a cmp lc $b
1396 0 0 if (($i += length $list[0]) < 80) { }
1403 0 0 if $i
1408 0 3 if (defined $_[2]) { }
0 3 elsif (not $_[0]) { }
0 3 elsif ($_[0] eq '#') { }
0 3 elsif ($_[0] eq '.') { }
2 1 elsif ($_[0] eq '&') { }
1 0 elsif ($_[0] eq '\\') { }
1441 0 0 unless @keys_Table_Columns
1444 0 0 unless $_[1]
1445 0 0 if $_[1] and $_ = &find($_[1], '.', '', \%Columns)
1448 0 2 unless $_[1]
1458 0 1 unless $_[1]
1467 0 0 unless $_[1]