Branch Coverage

blib/lib/SQL/Preproc.pm
Criterion Covered Total %
branch 100 172 58.1


line true false branch
683 0 2 $SQL::Preproc::RELAXED ? :
705 0 0 unless $src =~ /^CALL\s+(\w+)(\s*\(.*\))?$/is
710 0 0 if ($params)
717 0 0 if $params
726 0 0 if (scalar @inphs)
741 0 0 if (scalar @outphs)
752 0 0 $SQL::Preproc::RELAXED ? :
808 0 33 unless defined $args[0]
813 0 33 unless $args[0] =~ /^[\0\01]/
816 22 0 $args[2] =~ /^[\0\01]/ ? :
22 11 defined $args[2] ? :
817 11 0 $args[4] =~ /^[\0\01]/ ? :
11 22 defined $args[4] ? :
818 0 33 $args[6] =~ /^[\0\01]/ ? :
33 0 defined $args[6] ? :
819 33 0 unless defined $args[8]
821 0 33 $SQL::Preproc::SUBCLASS ? :
844 0 2 unless $name
871 0 1 $SQL::Preproc::RELAXED ? :
897 0 9 unless $src =~ /^DECLARE\s+(CURSOR\s+(\w+|\01\d+\01)\s+AS\s+(SELECT\b.+))|(CONTEXT\s+(\01(\d+)\01))$/is
899 1 8 if (defined $1)
917 1 0 $SQL::Preproc::RELAXED ? :
947 0 1 if (scalar @vars)
953 1 0 $SQL::Preproc::RELAXED ? :
967 0 8 unless substr($sqlpp_ctxt, 0, 1) eq '$'
996 3 0 if defined $var
999 0 3 unless defined $name
1009 0 3 unless ($var)
1027 1 2 if substr($var, 0, 1) eq '$'
1030 1 2 substr($var, 0, 1) eq '$' ? :
1057 0 11 unless $src =~ /^DISCONNECT(\s+(\w+|\01\d+\01))?$/is
1060 0 4 substr($name, 0, 1) eq "\cA" ? :
4 7 if $name
1066 7 4 unless $name
1086 0 2 $SQL::Preproc::RELAXED ? :
2 2 unless uc $name eq 'ALL'
1161 1 9 if scalar @vars and substr($vars[0], 0, 1) eq '@'
1168 2 8 if (scalar @vars)
1178 0 10 $SQL::Preproc::RELAXED ? :
1185 0 10 if (defined $cursor and $cursor ne '') { }
1186 0 0 $SQL::Preproc::RELAXED ? :
1210 10 0 unless $SQL::Preproc::RELAXED and $cursor eq ''
1214 10 0 $cursor eq '' ? :
1256 10 0 unless $SQL::Preproc::RELAXED and $cursor eq ''
1275 0 4 $SQL::Preproc::RELAXED ? :
1305 0 4 unless $src =~ /^EXEC(UTE)?\s+(\w+|[01]\d+[\01])$/is
1308 0 4 if $name =~ /\01(\d+)/
1309 0 4 $SQL::Preproc::RELAXED ? :
1357 0 4 $SQL::Preproc::RELAXED ? :
1373 0 6 unless defined $name
1375 0 6 if $name =~ /\01(\d+)/
1376 3 3 $src ? :
1378 5 0 if $vars[$_] =~ /\:\01(\d+)/
1382 6 0 $SQL::Preproc::RELAXED ? :
1408 3 3 if (not scalar @vars) { }
1 2 elsif (substr($vars[0], 0, 1) eq '%') { }
1 1 elsif (substr($vars[0], 0, 1) eq '@') { }
1466 0 4 unless $src =~ /^OPEN\s+(\w+|\01\d+\01)$/
1520 0 3 unless $src =~ /^PREPARE\s+(\01\d+\01|\w+)\s+AS\s+(.+)$/is
1528 1 2 if (scalar @vars)
1533 0 2 unless $first eq substr($vars[$_], 0, 1)
1541 0 3 $SQL::Preproc::RELAXED ? :
1580 0 1 $SQL::Preproc::RELAXED ? :
1609 8 2 if $src =~ /\bINTO\s+(:\01\d+\01(\s*,\s*:\01\d+\01)*)/is
1615 16 0 if $vars[$_] =~ /\:\01(\d+)/
1621 8 2 if (scalar @vars)
1623 0 8 if $first eq '%' || $first eq '@' and scalar @vars > 1
1628 0 16 if substr($vars[$_], 0, 1) ne $first
1649 1 9 scalar @invars ? :
1655 0 10 $SQL::Preproc::RELAXED ? :
1701 2 8 if (not scalar @vars) { }
2 6 elsif (substr($vars[0], 0, 1) eq '%') { }
2 4 elsif (substr($vars[0], 0, 1) eq '@') { }
1753 0 10 $SQL::Preproc::RELAXED ? :
1775 0 3 unless $name
1777 0 3 $SQL::Preproc::RELAXED ? :
1804 0 1 unless $src =~ /^RAISE\s+(SQLERROR|NOT\s+FOUND)(\s+(.+))?/is
1806 1 0 uc $1 eq 'SQLERROR' ? :
1807 1 0 defined $3 ? :
1820 3 2 uc $cond eq 'SQLERROR' ? :
1862 0 1 unless $$str =~ /\G<<\s*(('[^']+')|("[^"]+"))\s*(;)?/cgs
1865 1 0 $$str =~ /\G.*?\n${delim}[ \t\r\f]*\n/cgs ? :
0 0 $1 ? :
0 0 $$str =~ /\G.*?\n${delim}[ \t\r\f]*(;)?[ \t\r\f]*\n/cgs ? :
1 0 $4 ? :
1874 12 12 if scalar @$phs