Branch Coverage

blib/lib/DBIx/Safe.pm
Criterion Covered Total %
branch 0 146 0.0


line true false branch
42 0 0 unless index $key, 'dbixsafe_'
44 0 0 if (exists $$inner{'dbixsafe_allow_attribute'}{$key})
56 0 0 unless index $key, 'dbixsafe_'
74 0 0 unless ref $arg and ref $arg eq 'HASH'
76 0 0 unless exists $$arg{'dbh'}
78 0 0 unless ref $sdbh and ref $sdbh eq 'DBI::db'
91 0 0 unless my $db = $$sdbh{'Driver'}{'Name'}
93 0 0 if ($db eq 'Pg') { }
97 0 0 unless $libversion =~ /^\d+$/ and $libversion >= 80000
100 0 0 unless $libversion =~ /^\d+$/ and $libversion >= 70400
113 0 0 if (exists $$arg{'allow_command'})
116 0 0 if (exists $$arg{'allow_regex'})
119 0 0 if (exists $$arg{'deny_regex'})
122 0 0 if (exists $$arg{'allow_attribute'})
155 0 0 unless $type =~ /^(?:do|prepare)$/io
160 0 0 unless $string =~ s/^\s*(\w+)\s*/$1 /
166 0 0 if (exists $transword{$firstword})
172 0 0 if ($string =~ /$deny/)
179 0 0 if ($$self{'dbixsafe_db'} eq 'Postgres') { }
181 0 0 if ($firstword =~ /^(?:select|update|delete|insert)$/)
182 0 0 unless (exists $$self{'dbixsafe_allow_command'}{$firstword})
188 0 0 if $type eq 'prepare'
198 0 0 if ($string =~ /;/)
204 0 0 if (exists $$self{'dbixsafe_allow_command'}{$firstword}) { }
212 0 0 if ($string =~ /^$regex/)
220 0 0 unless $found
222 0 0 if ($type eq 'do')
228 0 0 if $type eq 'prepare'
251 0 0 ref $string ? :
255 0 0 if (not $slice and $slice = $$attr{'Columns'})
256 0 0 if (ref $slice eq 'ARRAY')
262 0 0 if defined $MaxRows
269 0 0 ref $string ? :
278 0 0 ref $string ? :
281 0 0 if my $row = $sth->fetchrow_arrayref
282 0 0 unless wantarray
289 0 0 ref $string ? :
292 0 0 if my $row = $sth->fetchrow_arrayref
299 0 0 ref $string ? :
302 0 0 if my $row = $sth->fetchrow_hashref
309 0 0 ref $string ? :
312 0 0 $$attr{'Columns'} ? :
316 0 0 unless $sth->bind_col($_, \$values[$idx++])
319 0 0 if (my $max = $$attr{'MaxRows'}) { }
334 0 0 unless (my $method = (caller 1)[3]) =~ s/^DBIx::Safe::(\w+)$/$1/
336 0 0 unless exists $inner{$self}{'dbixsafe_allow_command'}{$method}
377 0 0 unless exists $inner{$self}{'dbixsafe_allow_command'}{'trace'} or not @_
394 0 0 unless (my $method = (caller 1)[3]) =~ s/^DBIx::Safe::(\w+)$/$1/
397 0 0 $key =~ s/^un// ? :
398 0 0 unless my $list = $inner{$self}{"dbixsafe_$key"}
401 0 0 unless defined $arg
408 0 0 if (ref $arg) { }
409 0 0 unless ref $arg eq 'ARRAY'
411 0 0 if (exists $string{lc $s} and $strictdoubles)
425 0 0 unless ($c =~ /^[a-z_]+$/)
428 0 0 if (exists $command{$c} and $strictdoubles)
431 0 0 if ($type eq 'remove') { }
432 0 0 if (not exists $$list{$c} and $strictexists)
437 0 0 if (exists $$list{$c} and $strictexists)
445 0 0 if ($type eq 'remove') { }
449 0 0 if ($c eq 'autocommit')
468 0 0 unless (my $method = (caller 1)[3]) =~ s/^DBIx::Safe::(\w+)$/$1/
471 0 0 $key =~ s/^un// ? :
472 0 0 unless my $list = $inner{$self}{"dbixsafe_$key"}
475 0 0 unless defined $arg
478 0 0 unless ref $arg
484 0 0 if (ref $arg eq 'ARRAY') { }
0 0 elsif (ref $arg eq 'Regexp') { }
486 0 0 unless ref $r and ref $r eq 'Regexp'
487 0 0 if (exists $regex{$r} and $strictdoubles)
501 0 0 if ($type eq 'remove') { }
502 0 0 if (not exists $$list{$r} and $strictexists)
508 0 0 if (exists $$list{$r} and $strictexists)