Condition Coverage

blib/lib/SQL/Abstract.pm
Criterion Covered Total %
condition 100 141 70.9


and 2 conditions

line l !l condition
980 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 603 6 2 $opt{'case'} and $opt{'case'} ne 'lower'
526 46 0 463 defined $sql && length $sql
578 22 636 30 defined $el and not length $el
655 10 9 0 defined $self->{'_nested_func_lhs'} and $self->{'_nested_func_lhs'} eq $k
687 239 205 2 not defined $self->{'_nested_func_lhs'} and &List::Util::first(sub { $op =~ /$_->{'regex'}/; } , @{$$self{'special_ops'};})
879 0 23 22 defined $v[0] && $v[0] =~ /^ - (?: AND|OR ) $/xi
932 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'}
997 554 0 7 defined $all_sql && $all_sql
1033 32 72 2 defined $vals[0] and $vals[0] =~ /^ - (AND|OR) $/xi
1041 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'}/
1066 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'}
1211 1 34 2 defined $vals and not ref $vals
1313 0 5 1 defined $remainder and $remainder =~ /\S/

or 2 conditions

line l !l condition
153 49 562 $opt{'bindtype'} ||= 'normal'
156 9 602 $opt{'cmp'} ||= '='
167 0 611 $opt{'sqltrue'} ||= '1=1'
168 0 611 $opt{'sqlfalse'} ||= '0=1'
171 1 610 $opt{'special_ops'} ||= []
176 0 611 $opt{'unary_ops'} ||= []
214 49 0 shift() || (return)
366 38 0 shift() || (return)
463 102 0 shift() || '*'
903 1 582 $logic ||= 'and'
1446 449 35 $_[0]{'name_sep'} || ''
1530 3164 2 $ref || 'SCALAR'
1582 6 0 shift() || (return)

or 3 conditions

line l !l&&r !l&&!r condition
143 0 611 0 ref $self || $self
187 0 611 0 $opt{'injection_guard'} ||= qr/ \; | ^ \s* go \s /mix
427 0 0 4 @rest or not $op =~ /^\-(.+)/
568 143 252 0 $logic || $self->{'logic'}
569 72 323 0 $logic eq 'AND' or $logic eq 'OR'
655 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
822 2 0 6 not defined $rhs or length ref $rhs
1041 40 0 2 !$logic || $logic eq 'OR'
11 25 4 $op =~ /$self->{'inequality_op'}/xi || $op =~ /$self->{'not_like_op'}/
1180 0 0 2 @rest or not $func =~ /^ \- (.+)/x
1237 0 0 1 @rest or not $func =~ /^ \- (.+)/x
1376 2 0 38 @rest or not $key =~ /^-(desc|asc)/i
1441 2 482 0 $_[0]{'escape_char'} || $r
1477 0 10 21 not defined $_ or ref $_ ne 'ARRAY'
10 0 21 not defined $_ or ref $_ ne 'ARRAY' or @$_ != 2
1536 1972 251 3156 $try[0] eq 'SCALAR' or $try[0] eq 'UNDEF'
1550 2663 0 0 $method || &puke("cannot dispatch on '${meth_prefix}' for " . $self->_refkind($data))