Condition Coverage

blib/lib/SQL/Abstract/Classic.pm
Criterion Covered Total %
condition 95 141 67.3


and 2 conditions

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

and 3 conditions

line !l l&&!r l&&r condition
55 0 0 148 @_ > 1 and length ref $_[0]
64 0 0 116 @_ > 1 and length ref $_[0]
81 591 6 2 $opt{'case'} and $opt{'case'} ne 'lower'
412 46 0 451 defined $sql && length $sql
464 22 636 30 defined $el and not length $el
541 10 9 0 defined $self->{'_nested_func_lhs'} and $self->{'_nested_func_lhs'} eq $k
573 239 205 2 not defined $self->{'_nested_func_lhs'} and &List::Util::first(sub { $op =~ /$_->{'regex'}/; } , @{$$self{'special_ops'};})
771 0 23 22 defined $v[0] && $v[0] =~ /^ - (?: AND|OR ) $/xi
824 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'}
889 554 0 7 defined $all_sql && $all_sql
925 32 72 2 defined $vals[0] and $vals[0] =~ /^ - ( AND|OR ) $/xi
933 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'}/
959 0 0 16 $self->belch("Supplying an empty arrayref to '@{[uc $op];}' is deprecated") && $self->{'sqlfalse'}
0 0 24 $self->belch("Supplying an empty arrayref to '@{[uc $op];}' is deprecated") && $self->{'sqltrue'}
1104 1 34 2 defined $vals and not ref $vals
1203 0 5 1 defined $remainder and $remainder =~ /\S/

or 2 conditions

line l !l condition
87 49 550 $opt{'bindtype'} ||= 'normal'
90 9 590 $opt{'cmp'} ||= '='
101 0 599 $opt{'sqltrue'} ||= '1=1'
102 0 599 $opt{'sqlfalse'} ||= '0=1'
105 1 598 $opt{'special_ops'} ||= []
110 0 599 $opt{'unary_ops'} ||= []
150 49 0 shift() || (return)
289 32 0 shift() || (return)
367 102 0 shift() || '*'
795 1 582 $logic ||= 'and'
1343 428 33 $_[0]{'name_sep'} || ''
1427 3144 2 $ref || 'SCALAR'
1479 6 0 shift() || (return)

or 3 conditions

line l !l&&r !l&&!r condition
77 0 599 0 ref $self || $self
121 0 599 0 $opt{'injection_guard'} ||= qr/ \; | ^ \s* go \s /mix
327 0 0 4 @rest or not $op =~ /^\-(.+)/
454 143 252 0 $logic || $self->{'logic'}
455 72 323 0 $logic eq 'AND' or $logic eq 'OR'
541 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
714 2 0 6 not defined $rhs or length ref $rhs
933 40 0 2 !$logic || $logic eq 'OR'
11 25 4 $op =~ /$self->{'inequality_op'}/xi || $op =~ /$self->{'not_like_op'}/
1073 0 0 2 @rest or not $func =~ /^ \- (.+)/x
1130 0 0 1 @rest or not $func =~ /^ \- (.+)/x
1266 2 0 38 @rest or not $key =~ /^-(desc|asc)/i
1338 2 459 0 $_[0]{'escape_char'} || $r
1374 0 10 21 not defined $_ or ref $_ ne 'ARRAY'
10 0 21 not defined $_ or ref $_ ne 'ARRAY' or @$_ != 2
1433 1894 245 3136 $try[0] eq 'SCALAR' or $try[0] eq 'UNDEF'
1447 2639 0 0 $method || $self->puke("cannot dispatch on '${meth_prefix}' for " . $self->_refkind($data))
1480 0 0 0 ref $self || $self