Condition Coverage

blib/lib/SQL/Abstract.pm
Criterion Covered Total %
condition 98 138 71.0


and 2 conditions

line l !l condition
973 0 9 &belch("Supplying an undefined argument to '@{[uc $op];}' is deprecated") && 'is'
0 32 &belch("Supplying an undefined argument to '@{[uc $op];}' is deprecated") && 'is not'

and 3 conditions

line !l l&&!r l&&r condition
80 28 0 9 ref $_[0] eq 'REF' && ref ${$_[0];} eq 'ARRAY'
127 43 0 2 ref $_[0] eq 'HASH' && keys %{$_[0];} == 1 && exists $_[0]{'-value'}
3 8 32 defined($_[1] = &Scalar::Util::blessed($_[0])) && (grep({*{qq[${_}::(""];}{'CODE'};} @{$_[2] = &mro::get_linear_isa($_[1]);}) || (grep({*{"${_}::(0+";}{'CODE'};} @{$_[2];}) || grep({*{"${_}::(bool";}{'CODE'};} @{$_[2];})) && !((($_[3]) = grep({*{"${_}::()";}{'CODE'};} @{$_[2];})) && defined ${"$_[3]::()";} && !${"$_[3]::()";}))
147 602 6 2 $opt{'case'} and $opt{'case'} ne 'lower'
571 22 636 30 defined $el and not length $el
648 10 9 0 defined $self->{'_nested_func_lhs'} and $self->{'_nested_func_lhs'} eq $k
680 239 205 2 not defined $self->{'_nested_func_lhs'} and &List::Util::first(sub { $op =~ /$_->{'regex'}/; } , @{$$self{'special_ops'};})
872 0 23 22 defined $v[0] && $v[0] =~ /^ - (?: AND|OR ) $/xi
925 546 1 41 ref $val eq 'HASH' and keys %$val == 1
547 9 32 ref $val eq 'HASH' and keys %$val == 1 and exists $val->{'-value'}
9 4 28 ref $val eq 'HASH' and keys %$val == 1 and exists $val->{'-value'} and not defined $val->{'-value'}
990 554 0 7 defined $all_sql && $all_sql
1026 32 72 2 defined $vals[0] and $vals[0] =~ /^ - (AND|OR) $/xi
1034 64 2 40 @vals > 1 and !$logic || $logic eq 'OR'
2 5 35 @vals > 1 and !$logic || $logic eq 'OR' and $op =~ /$self->{'inequality_op'}/xi || $op =~ /$self->{'not_like_op'}/
1059 0 0 16 &belch("Supplying an empty arrayref to '@{[uc $op];}' is deprecated") && $self->{'sqlfalse'}
0 0 24 &belch("Supplying an empty arrayref to '@{[uc $op];}' is deprecated") && $self->{'sqltrue'}
1204 1 34 2 defined $vals and not ref $vals
1306 0 5 1 defined $remainder and $remainder =~ /\S/

or 2 conditions

line l !l condition
153 49 561 $opt{'bindtype'} ||= 'normal'
156 9 601 $opt{'cmp'} ||= '='
167 0 610 $opt{'sqltrue'} ||= '1=1'
168 0 610 $opt{'sqlfalse'} ||= '0=1'
171 1 609 $opt{'special_ops'} ||= []
176 0 610 $opt{'unary_ops'} ||= []
214 49 0 shift() || (return)
366 38 0 shift() || (return)
463 102 0 shift() || '*'
896 1 582 $logic ||= 'and'
1439 449 33 $_[0]{'name_sep'} || ''
1523 3163 2 $ref || 'SCALAR'
1575 6 0 shift() || (return)

or 3 conditions

line l !l&&r !l&&!r condition
143 0 610 0 ref $self || $self
187 0 610 0 $opt{'injection_guard'} ||= qr/ \; | ^ \s* go \s /mix
427 0 0 4 @rest or not $op =~ /^\-(.+)/
561 143 252 0 $logic || $self->{'logic'}
562 72 323 0 $logic eq 'AND' or $logic eq 'OR'
648 182 0 19 &List::Util::first(sub { $op =~ /$_->{'regex'}/; } , @{$$self{'unary_ops'};}) or defined $self->{'_nested_func_lhs'} and $self->{'_nested_func_lhs'} eq $k
815 2 0 6 not defined $rhs or length ref $rhs
1034 40 0 2 !$logic || $logic eq 'OR'
11 25 4 $op =~ /$self->{'inequality_op'}/xi || $op =~ /$self->{'not_like_op'}/
1173 0 0 2 @rest or not $func =~ /^ \- (.+)/x
1230 0 0 1 @rest or not $func =~ /^ \- (.+)/x
1369 2 0 38 @rest or not $key =~ /^-(desc|asc)/i
1434 2 480 0 $_[0]{'escape_char'} || $r
1470 0 10 21 not defined $_ or ref $_ ne 'ARRAY'
10 0 21 not defined $_ or ref $_ ne 'ARRAY' or @$_ != 2
1529 1972 251 3155 $try[0] eq 'SCALAR' or $try[0] eq 'UNDEF'
1543 2662 0 0 $method || &puke("cannot dispatch on '${meth_prefix}' for " . $self->_refkind($data))