Branch Coverage

blib/lib/SQL/Steno.pm
Criterion Covered Total %
branch 236 344 68.6


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) { }
332 2 3 if ($type < 2)
333 2 0 unless $str =~ /_/u
334 0 0 $type ? :
337 2 1 if ($type < 4)
339 1 1 if $type == 2
349 41 13 if $ret
352 2 11 if $ret
353 2 11 if $ret
355 11 0 if ($list)
357 18 5 $type < @simple ? :
360 2 21 unless defined $expr
362 10 11 if (@res)
363 10 0 if @res == 1
371 1 0 if ord $prefix == 46 or ord $suffix == 40
384 0 5 unless (defined $quotes and "\\$quotes" =~ /^$quote_re$/ou)
385 0 0 $quotes ? :
394 4 18 unless defined $_
402 0 18 tr/\-// ? :
403 4 14 tr/ // ? :
406 1 17 $space ? :
408 12 31 if ($noquote or $boolean and /^(?:true|false)$/iu or $null and /^null$/iu or $var and /^\@\w+$/u) { }
4 27 elsif ($number and /^[-+]?(?:0b[01]+|0x[\da-f]+|(?=\.?\d)\d*\.?\d*(?:e[-+]?\d+)?)$/iu) { }
417 22 1 unless ($space)
430 4 10 $ref ? :
432 10 4 unless $ref
435 4 10 if $ref
439 2 14 if ($4 and $4 > @arg) { }
442 3 11 $5 ? :
443 10 4 if $4
447 1 9 if (@arg > keys %seen)
454 2 0 $res[4] eq '>' ? :
1 2 $res[4] eq '*' ? :
1 10 $res[3] < 0 ? :
3 11 $res[4] ? :
465 30 0 unless @keys_Table_Columns
466 0 0 defined $2 ? :
0 0 $2 ? :
30 0 unless $error
468 2 28 unless ($table_re)
470 0 2 $table_re ? :
472 30 0 unless ($error)
478 0 1 defined $1 ? :
0 1 defined $3 ? :
0 1 $3 ? :
696 3 5 $1 ? :
3 5 $1 ? :
705 5 55 if ($1 eq '\\') { }
44 11 elsif (not /\G$rq/cgu) { }
717 0 0 if $@
16 8 unless s[:$perl_re][my $ret = eval $1; warn $@ if $@; $ret // ' NULL ';]egou or s/:(${timespec_re}[+-]\d*$timespec_re(?(?<=\w)\b)|l?j\w+(?:#(\w*))|\w+)/&find($1, ':', '', \%Macros);/egou
727 16 0 unless $error
730 0 16 if $error
733 0 16 if (s/^upd(?:a(?:t(?:e)?)?)?\b/update/iu) { }
734 0 0 if s/(?
737 16 0 unless s/^ins(?:e(?:r(?:t)?)?)?\b/insert/iu or s/^del(?:e(?:t(?:e)?)?)?\b/delete/iu
758 11 5 if (@_)
762 2 9 select() eq 'main::STDOUT' ? :
765 0 5 if (--$i <= 0 and $cnt < $total)
769 0 0 if (defined $i) { }
771 0 0 $i == 0 ? :
0 0 $i eq '*' ? :
0 0 0 == length $i ? :
789 5 1 if $_[2]
794 156 6 if (defined $_) { }
795 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
805 6 6 $tab ? :
6 12 $semi ? :
807 6 15 unless @row = $sth->fetchrow_array
810 6 9 if $filter
826 1 11 exists $_[2]{'null'} ? :
0 12 exists $_[2]{'NULL'} ? :
2 12 exists $_[2]{'all'} ? :
14 2 if $_[2]
832 1 79 if $filter
834 4 576 if (not defined $res1[$i]) { }
537 39 elsif (not $res1[$i] =~ /^\d+(?:\.\d+)?$/u) { }
838 411 126 unless $crlf
841 215 322 unless ($date)
842 109 106 if ($res1[$i] =~ s/^(\d{4}-)($r1)-0[01]([T ]$r2:$r5(?::$r5(?:[.,]\d{3})?)?(?:Z|[+-]$r2:$r5)?)?$/$1/ou)
843 24 85 if $2 > 1
844 91 18 if $3
847 215 322 unless ($time)
848 170 45 if ($res1[$i] =~ s/^(\d{4}-(?:$r1-(?:$r3)?)?[T ])?($r2):($r5)(?::($r5)(?:([.,])(\d{3}))?)?(Z|[+-]$r2:$r5)?$/$1/ou)
850 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) { }
861 84 86 if $7
867 10 570 if @txt < $i
869 184 396 if $len[$i] < $len
871 71 9 if (@comp) { }
873 62 447 if defined $comp[$i] and $comp[$i] ne $res1[$i]
880 9 7 if (@res)
881 1 8 if @res == 1
886 0 71 if (defined $comp[$i])
889 0 0 unless $more
900 9 62 if ($len[$i] < length $name[$i])
904 67 4 $txt[$i] ? :
907 8 1 if $name[-1]
912 1 79 if defined $count
929 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//) { }
940 0 1 $nl ? :
942 36 18 if @label
944 4 2 if (@label) { }
945 4 0 if defined $count
949 16 2 $maxlen ? :
951 1 19 $1 ? :
954 7 11 if $maxlen < $length
959 2 5 unless @row = $sth->fetchrow_array
962 2 3 if $filter
972 0 12 if ($DBI::err || $t0->[0] - $lasttime > 3600 and not $dbh->ping)
980 0 12 UNIVERSAL::isa($sql, 'DBI::st') ? :
12 0 if (my $sth = UNIVERSAL::isa($sql, 'DBI::st') ? $sql : $dbh->prepare($sql))
985 12 0 if ($sth->{'Active'})
986 4 8 if ($render) { }
1216 2 18 unless /\S/u
1217 1 17 if (s/^\s*\\\\\s*//u) { }
1230 18 0 if $echo
1232 2 31 if (s/^&$perl_re//u) { }
1235 0 2 if $@
1236 0 2 if (UNIVERSAL::isa($perl, 'DBI::st')) { }
1 1 elsif (defined $perl) { }
1246 17 14 unless s/^&(\.?\w+|-)(\(((?:(?>[^()]+)|(?2))*)\))/&convert_Query($1, $3);/eu or s/^&(\.?\w+|-) *(.*)/&convert_Query($1, $2);/eu
1253 3 6 if (defined $2) { }
1259 7 10 if ($filter)
1261 0 7 if $@
1263 5 12 if s/^\s*=//u
1266 3 9 if (/^\s*\?\s*(?:([?&#.:\\])(\w*)|(\w*)\()?/u)
1267 0 3 if ($1 and $1 eq '?') { }
1275 0 9 if (s/^\s*!//u)
1277 0 0 if ($? == -1) { }
0 0 elsif (my $exit = $? & 127) { }
1280 0 0 $? & 128 ? :
1288 0 9 if (/\A(>{1,2})\s*(.+?(\.\w+)?)(?:\((.*)\))?\s*\Z/u) { }
0 9 elsif (/\A\|(.+)\Z/u) { }
1289 0 0 $4 ? :
0 0 if $3
1301 2 7 unless $_ and &convert
1304 0 7 if $skip
1306 12 0 if $dbh
1309 0 12 if ($fh)
1324 0 0 if (@_)
1336 3 0 if ($_[0]) { }
1338 3 0 if $_ = &find
1341 0 0 if (my $sub = delete $hash{''})
1349 0 0 unless lc $a cmp lc $b
1350 0 0 unless $_[4]
1352 0 0 unless lc $a cmp lc $b
1354 0 0 if (($i += length $list[0]) < 80) { }
1361 0 0 if $i
1366 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 '\\') { }
1399 0 0 unless @keys_Table_Columns
1402 0 0 unless $_[1]
1403 0 0 if $_[1] and $_ = &find($_[1], '.', '', \%Columns)
1406 0 2 unless $_[1]
1416 0 1 unless $_[1]
1425 0 0 unless $_[1]