Branch Coverage

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


line true false branch
78 0 320 if (not $func or ref $func or not $func =~ /\A[A-Za-z]\w*\z/ms)
81 120 200 if (not ref $cmd) { }
120 80 elsif (ref $cmd eq 'ARRAY') { }
0 80 elsif (ref $cmd ne 'CODE') { }
82 0 120 if (2 != (() = $cmd =~ /%s/gms))
86 0 120 if (2 != @{$cmd;} or ref $cmd->[0] ne 'Regexp' or (ref $cmd->[1] or 2 != (() = $cmd->[1] =~ /%s/gms)))
100 0 0 if ($cb) { }
103 0 0 wantarray ? :
109 0 0 if ($cb) { }
118 0 0 unless ($cb)
129 0 0 if ($cache and ref $cache eq 'HASH') { }
143 0 0 if ($cache->{$table})
147 0 0 unless ($cb)
159 0 0 if (@desc)
161 0 0 if (1 != @pk or $pk[0] != 0)
174 0 0 ref $tables eq 'ARRAY' ? :
175 0 0 if (not @tables or &any(sub { /\A\z|\s/ms; } , @tables))
179 0 0 unless ($cb)
182 0 0 unless ($desc)
190 0 0 unless ($desc)
194 0 0 if (@tables)
206 0 0 ref $tables ? :
207 0 0 unless ($cb)
219 0 0 unless ($cache)
225 0 0 ref $tables eq 'ARRAY' ? :
226 0 0 if (/\A(\S+)(?:\s+(LEFT|INNER))?\s*\z/ism) { }
259 0 0 $field[$right]{$lkey} ? :
0 0 $field[$left]{$rkey} ? :
273 0 0 if $qualify{$f}
283 0 0 unless $k =~ /\A$IDENT(?:__(?!_)$IDENT)?\z/ms
284 0 0 unless my $f = $qualify{$1}
287 0 0 unless ($cmd)
290 0 0 if (not $func and ref $P->{$k})
295 0 0 $is_list ? :
296 0 0 ref $cmd eq 'ARRAY' ? :
0 0 ref $cmd eq 'CODE' ? :
300 0 0 unless ($expr)
303 0 0 if not $func or $func =~ /\Aset_/ms
304 0 0 unless $func =~ /\Aset_/ms
305 0 0 if $func and not $func =~ /\Aset_/ms
306 0 0 if $k eq $SQL{'ID'}
317 0 0 ref $P->{'__order'} ? :
318 0 0 unless defined $order
319 0 0 unless ($order =~ /\A(\w+)\s*( ASC| DESC|)\z/ms and $qualify{$1})
324 0 0 ref $P->{'__group'} ? :
325 0 0 unless defined $group
326 0 0 unless ($group =~ /\A(\w+)\s*( ASC| DESC|)\z/ms and $qualify{$1})
335 0 0 ref $P->{'__limit'} ? :
339 0 0 if (@limit == 1) { }
0 0 elsif (@limit == 2) { }
0 0 elsif (@limit > 2) { }
355 0 0 unless my $SQL = $dbh->GetSQL($table, $P)
360 0 0 unless ($cb)
361 0 0 $dbh->do($sql) ? :
365 0 0 $rv ? :
371 0 0 unless my $SQL = $dbh->GetSQL($table, $P)
380 0 0 unless my $SQL = $dbh->GetSQL($table, $P)
381 0 0 if ($SQL->{'UpdateWhere'} eq '1' and not $P->{'__force'})
387 0 0 $SQL->{'Limit'} ? :
393 0 0 unless my $SQL = $dbh->GetSQL($table, $P)
402 0 0 unless (@{$tables;})
407 0 0 unless ($cb)
410 0 0 if ($desc)
413 0 0 if (@{$fields;} == grep({++$seen{$_} == 2;} @{$fields;}, @columns))
423 0 0 if ($desc)
426 0 0 if (@{$fields;} == grep({++$seen{$_} == 2;} @{$fields;}, @columns))
430 0 0 if (@{$tables;})
442 0 0 unless (defined $table)
443 0 0 /\A$IDENT(?:__(?!_)$IDENT)?\z/ms ? :
445 0 0 unless (@fields)
448 0 0 unless ($cb)
457 0 0 ref $table ? :
458 0 0 unless ($cb)
461 0 0 unless my $SQL = $dbh->GetSQL($t, $P)
462 0 0 if ($SQL->{'Where'} eq '1' and not $P->{'__force'})
466 0 0 $SQL->{'Limit'} ? :
467 0 0 unless $res = $dbh->do($sql)
474 0 0 unless ($SQL)
478 0 0 if ($SQL->{'Where'} eq '1' and not $P->{'__force'})
483 0 0 $SQL->{'Limit'} ? :
486 0 0 if ($res and @tables)
498 0 0 unless my $SQL = $dbh->GetSQL($table, $P)
504 0 0 $SQL->{'Order'} ? :
0 0 $SQL->{'SelectLimit'} ? :
510 0 0 unless my $SQL = $dbh->GetSQL($table, $P)
519 0 0 unless my $SQL = $dbh->GetSQL($table, $P)
528 0 0 $SQL->{'Group'} ? :
0 0 $SQL->{'Group'} ? :
0 0 $SQL->{'Order'} ? :
0 0 $SQL->{'SelectLimit'} ? :
529 0 0 unless ($cb)
530 0 0 wantarray ? :
543 0 0 @bind && _is_cb($bind[-1]) ? :
544 0 0 unless ($cb)
545 0 0 unless (my $sth = $dbh->prepare($sql, {'async', 0}))->execute(@bind)
550 0 0 !$rv ? :
561 0 0 @bind && _is_cb($bind[-1]) ? :
562 0 0 unless ($cb)
563 0 0 unless $dbh->selectcol_arrayref($sql, undef, @bind)
564 0 0 wantarray ? :
568 0 0 $ary_ref ? :