Branch Coverage

blib/lib/SQL/Steno.pm
Criterion Covered Total %
branch 232 336 69.0


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) { }
315 2 3 if ($type < 2)
316 2 0 unless $str =~ /_/u
317 0 0 $type ? :
320 2 1 if ($type < 4)
322 1 1 if $type == 2
332 40 13 if $ret
335 2 11 if $ret
336 2 11 if $ret
338 11 0 if ($list)
340 18 5 $type < @simple ? :
343 2 21 unless defined $expr
345 10 11 if (@res)
346 10 0 if @res == 1
354 1 0 if ord $prefix == 46 or ord $suffix == 40
366 4 15 unless defined $_
374 0 15 tr/\-// ? :
375 3 12 tr/ // ? :
378 1 14 $space ? :
380 3 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) { }
389 19 1 unless ($space)
402 4 10 $ref ? :
404 10 4 unless $ref
407 4 10 if $ref
411 2 14 if ($3 and $3 > @arg) { }
414 3 11 $4 ? :
415 10 4 if $3
419 1 9 if (@arg > keys %seen)
426 2 0 $res[3] eq '>' ? :
1 2 $res[3] eq '*' ? :
1 10 $res[2] < 0 ? :
3 11 $res[3] ? :
437 30 0 unless @keys_Table_Columns
438 0 0 defined $2 ? :
0 0 $2 ? :
30 0 unless $error
440 2 28 unless ($table_re)
442 0 2 $table_re ? :
444 30 0 unless ($error)
450 0 1 defined $1 ? :
0 1 defined $3 ? :
0 1 $3 ? :
665 3 2 $1 ? :
3 2 $1 ? :
674 5 55 if ($1 eq '\\') { }
44 11 elsif (not /\G$rq/cgu) { }
686 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
696 16 0 unless $error
699 0 16 if $error
702 0 16 if (s/^upd(?:a(?:t(?:e)?)?)?\b/update/iu) { }
703 0 0 if s/(?
706 16 0 unless s/^ins(?:e(?:r(?:t)?)?)?\b/insert/iu or s/^del(?:e(?:t(?:e)?)?)?\b/delete/iu
727 11 5 if (@_)
731 2 9 select() eq 'main::STDOUT' ? :
734 0 5 if (--$i <= 0 and $cnt < $total)
738 0 0 if (defined $i) { }
740 0 0 $i == 0 ? :
0 0 $i eq '*' ? :
0 0 0 == length $i ? :
758 5 1 if $_[2]
763 156 6 if (defined $_) { }
764 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
774 6 6 $tab ? :
6 12 $semi ? :
776 6 15 unless @row = $sth->fetchrow_array
779 6 9 if $filter
795 1 11 exists $_[2]{'null'} ? :
0 12 exists $_[2]{'NULL'} ? :
2 12 exists $_[2]{'all'} ? :
14 2 if $_[2]
801 1 79 if $filter
803 4 576 if (not defined $res1[$i]) { }
537 39 elsif (not $res1[$i] =~ /^\d+(?:\.\d+)?$/u) { }
807 411 126 unless $crlf
810 215 322 unless ($date)
811 109 106 if ($res1[$i] =~ s/^(\d{4}-)($r1)-0[01]([T ]$r2:$r5(?::$r5(?:[.,]\d{3})?)?(?:Z|[+-]$r2:$r5)?)?$/$1/ou)
812 24 85 if $2 > 1
813 91 18 if $3
816 215 322 unless ($time)
817 170 45 if ($res1[$i] =~ s/^(\d{4}-(?:$r1-(?:$r3)?)?[T ])?($r2):($r5)(?::($r5)(?:([.,])(\d{3}))?)?(Z|[+-]$r2:$r5)?$/$1/ou)
819 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) { }
830 84 86 if $7
836 10 570 if @txt < $i
838 184 396 if $len[$i] < $len
840 71 9 if (@comp) { }
842 62 447 if defined $comp[$i] and $comp[$i] ne $res1[$i]
849 9 7 if (@res)
850 1 8 if @res == 1
855 0 71 if (defined $comp[$i])
858 0 0 unless $more
869 9 62 if ($len[$i] < length $name[$i])
873 67 4 $txt[$i] ? :
876 8 1 if $name[-1]
881 1 79 if defined $count
898 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//) { }
909 0 1 $nl ? :
911 36 18 if @label
913 4 2 if (@label) { }
914 4 0 if defined $count
918 16 2 $maxlen ? :
920 1 19 $1 ? :
923 7 11 if $maxlen < $length
928 2 5 unless @row = $sth->fetchrow_array
931 2 3 if $filter
941 0 12 if ($DBI::err || $t0->[0] - $lasttime > 3600 and not $dbh->ping)
949 0 12 UNIVERSAL::isa($sql, 'DBI::st') ? :
12 0 if (my $sth = UNIVERSAL::isa($sql, 'DBI::st') ? $sql : $dbh->prepare($sql))
954 12 0 if ($sth->{'Active'})
955 4 8 if ($render) { }
1185 2 17 unless /\S/u
1186 1 16 if (s/^\s*\\\\\s*//u) { }
1199 17 0 if $echo
1201 2 30 if (s/^&$perl_re//u) { }
1204 0 2 if $@
1205 0 2 if (UNIVERSAL::isa($perl, 'DBI::st')) { }
1 1 elsif (defined $perl) { }
1215 16 14 unless s/^&(\.?\w+|-)(\(((?:(?>[^()]+)|(?2))*)\))/&convert_Query($1, $3);/eu or s/^&(\.?\w+|-) *(.*)/&convert_Query($1, $2);/eu
1222 3 6 if (defined $2) { }
1228 7 9 if ($filter)
1230 0 7 if $@
1232 5 11 if s/^\s*=//u
1235 2 9 if (/^\s*\?\s*(?:([?&#.:])(\w*)|(\w*)\()?/u)
1236 0 2 if ($1 and $1 eq '?') { }
1244 0 9 if (s/^\s*!//u)
1246 0 0 if ($? == -1) { }
0 0 elsif (my $exit = $? & 127) { }
1249 0 0 $? & 128 ? :
1257 0 9 if (/\A(>{1,2})\s*(.+?(\.\w+)?)(?:\((.*)\))?\s*\Z/u) { }
0 9 elsif (/\A\|(.+)\Z/u) { }
1258 0 0 $4 ? :
0 0 if $3
1270 2 7 unless $_ and &convert
1273 0 7 if $skip
1275 12 0 if $dbh
1278 0 12 if ($fh)
1293 0 0 if (@_)
1305 2 0 if ($_[0]) { }
1307 2 0 if $_ = &find
1310 0 0 if (my $sub = delete $hash{''})
1318 0 0 unless lc $a cmp lc $b
1319 0 0 unless $_[4]
1321 0 0 unless lc $a cmp lc $b
1323 0 0 if (($i += length $list[0]) < 80) { }
1330 0 0 if $i
1335 0 2 if (defined $_[2]) { }
0 2 elsif (not $_[0]) { }
0 2 elsif ($_[0] eq '#') { }
0 2 elsif ($_[0] eq '.') { }
2 0 elsif ($_[0] eq '&') { }
1367 0 0 unless @keys_Table_Columns
1370 0 0 unless $_[1]
1371 0 0 if $_[1] and $_ = &find($_[1], '.', '', \%Columns)
1374 0 2 unless $_[1]
1384 0 0 unless $_[1]