Branch Coverage

blib/lib/DBIx/SecureCGI.pm
Criterion Covered Total %
branch 8 202 3.9


line true false branch
79 0 336 if (not $func or ref $func or not $func =~ /\A[A-Za-z]\w*\z/ms)
82 126 210 if (not ref $cmd) { }
126 84 elsif (ref $cmd eq 'ARRAY') { }
0 84 elsif (ref $cmd ne 'CODE') { }
83 0 126 if (2 != (() = $cmd =~ /%s/gms))
87 0 126 if (2 != @{$cmd;} or ref $$cmd[0] ne 'Regexp' or (ref $$cmd[1] or 2 != (() = $$cmd[1] =~ /%s/gms)))
101 0 0 if ($cb) { }
104 0 0 wantarray ? :
110 0 0 if ($cb) { }
119 0 0 unless ($cb)
130 0 0 if ($cache and ref $cache eq 'HASH') { }
144 0 0 if ($$cache{$table})
148 0 0 unless ($cb)
160 0 0 if (@desc)
162 0 0 if (1 != @pk or $pk[0] != 0)
175 0 0 ref $tables eq 'ARRAY' ? :
176 0 0 if (not @tables or grep {/\A\z|\s/ms;} @tables)
180 0 0 unless ($cb)
183 0 0 unless ($desc)
191 0 0 unless ($desc)
195 0 0 if (@tables)
207 0 0 ref $tables ? :
208 0 0 unless ($cb)
220 0 0 unless ($cache)
226 0 0 ref $tables eq 'ARRAY' ? :
227 0 0 unless (/\A(\S+)(?:\s+(LEFT|INNER))?\s*\z/ism)
257 0 0 $field[$right]{$lkey} ? :
0 0 $field[$left]{$rkey} ? :
272 0 0 if $qualify{$f}
282 0 0 unless $k =~ /\A$IDENT(?:__(?!_)$IDENT)?\z/ms
283 0 0 unless my $f = $qualify{$1}
286 0 0 unless ($cmd)
289 0 0 if (not $func and ref $$P{$k})
294 0 0 $is_list ? :
295 0 0 ref $cmd eq 'ARRAY' ? :
0 0 ref $cmd eq 'CODE' ? :
299 0 0 unless ($expr)
302 0 0 if not $func or $func =~ /\Aset_/ms
303 0 0 unless $func =~ /\Aset_/ms
304 0 0 if $func and not $func =~ /\Aset_/ms
305 0 0 if $k eq $SQL{'ID'}
316 0 0 ref $$P{'__order'} ? :
317 0 0 unless defined $order
318 0 0 unless ($order =~ /\A(\w+)\s*( ASC| DESC|)\z/ms and $qualify{$1})
323 0 0 ref $$P{'__group'} ? :
324 0 0 unless defined $group
325 0 0 unless ($group =~ /\A(\w+)\s*( ASC| DESC|)\z/ms and $qualify{$1})
334 0 0 ref $$P{'__limit'} ? :
338 0 0 if (@limit == 1) { }
0 0 elsif (@limit == 2) { }
0 0 elsif (@limit > 2) { }
354 0 0 unless my $SQL = $dbh->GetSQL($table, $P)
359 0 0 unless ($cb)
360 0 0 $dbh->do($sql) ? :
364 0 0 $rv ? :
370 0 0 unless my $SQL = $dbh->GetSQL($table, $P)
379 0 0 unless my $SQL = $dbh->GetSQL($table, $P)
380 0 0 if ($$SQL{'UpdateWhere'} eq '1' and not $$P{'__force'})
384 0 0 $$SQL{'Limit'} ? :
392 0 0 unless my $SQL = $dbh->GetSQL($table, $P)
401 0 0 unless (@{$tables;})
406 0 0 unless ($cb)
409 0 0 if ($desc)
412 0 0 if (@{$fields;} == grep({++$seen{$_} == 2;} @{$fields;}, @columns))
422 0 0 if ($desc)
425 0 0 if (@{$fields;} == grep({++$seen{$_} == 2;} @{$fields;}, @columns))
429 0 0 if (@{$tables;})
441 0 0 unless (defined $table)
442 0 0 /\A$IDENT(?:__(?!_)$IDENT)?\z/ms ? :
444 0 0 unless (@fields)
447 0 0 unless ($cb)
456 0 0 ref $table ? :
457 0 0 unless ($cb)
460 0 0 unless my $SQL = $dbh->GetSQL($t, $P)
461 0 0 if ($$SQL{'Where'} eq '1' and not $$P{'__force'})
464 0 0 $$SQL{'Limit'} ? :
466 0 0 unless $res = $dbh->do($sql)
473 0 0 unless ($SQL)
477 0 0 if ($$SQL{'Where'} eq '1' and not $$P{'__force'})
481 0 0 $$SQL{'Limit'} ? :
485 0 0 if ($res and @tables)
497 0 0 unless my $SQL = $dbh->GetSQL($table, $P)
502 0 0 $$SQL{'Order'} ? :
0 0 $$SQL{'SelectLimit'} ? :
509 0 0 unless my $SQL = $dbh->GetSQL($table, $P)
518 0 0 unless my $SQL = $dbh->GetSQL($table, $P)
520 0 0 $$SQL{'Group'} ? :
0 0 $$SQL{'Group'} ? :
0 0 $$SQL{'Order'} ? :
0 0 $$SQL{'SelectLimit'} ? :
528 0 0 unless ($cb)
529 0 0 wantarray ? :
542 0 0 @bind && _is_cb($bind[-1]) ? :
543 0 0 unless ($cb)
544 0 0 unless (my $sth = $dbh->prepare($sql, {'async', 0}))->execute(@bind)
549 0 0 !$rv ? :
560 0 0 @bind && _is_cb($bind[-1]) ? :
561 0 0 unless ($cb)
562 0 0 unless $dbh->selectcol_arrayref($sql, undef, @bind)
563 0 0 wantarray ? :
567 0 0 $ary_ref ? :