Branch Coverage

blib/lib/DBIx/ThinSQL.pm
Criterion Covered Total %
branch 118 172 68.6


line true false branch
34 0 0 unless @_
109 0 35 if defined $DBIX::ThinSQL::SHARE_DIR
128 33 192 unless length $prefix
135 110 115 if ($ref eq '') { }
34 81 elsif ($ref eq 'DBIx::ThinSQL::query') { }
21 60 elsif ($ref eq 'DBIx::ThinSQL::list') { }
4 56 elsif ($ref eq 'DBIx::ThinSQL::table') { }
8 48 elsif ($ref eq 'DBIx::ThinSQL::values') { }
0 48 elsif ($ref eq 'DBIx::ThinSQL::case') { }
19 29 elsif ($ref eq 'DBIx::ThinSQL::expr') { }
25 4 elsif ($ref eq 'DBIx::ThinSQL::bind_value') { }
3 1 elsif ($ref eq 'DBIx::ThinSQL::quote_value') { }
1 0 elsif ($ref eq 'DBIx::ThinSQL::quote_identifier') { }
136 110 0 defined $val ? :
139 1 33 length $prefix ? :
141 0 89 if $pair->[0] =~ /UNION/
142 0 89 length $pair->[0] && $pair->[0] =~ /(JOIN)|(ON)/ ? :
144 89 0 if length $pair->[0]
148 89 0 if length $pair->[0] or length $pair->[1]
151 1 33 if length $prefix
158 0 19 if $i++
233 0 20 unless @_
255 0 20 if ($@)
256 0 0 unless $prepare_ok
272 1 12 unless @bv
284 0 12 if $@
337 3 0 if $ref
356 1 1 if $ref
368 1 1 if $ref
389 1 1 if $ref
415 0 1 unless eval { do { require $path; $class->new } }
419 4 2 unless ($txn)
427 6 0 unless exists $self->{'HandleError'}
433 4 2 if (not $txn) { }
442 1 5 if ($wantarray) { }
449 3 1 if (not $txn) { }
454 3 0 unless $self->{'AutoCommit'}
458 1 0 unless $self->{'AutoCommit'}
465 4 2 unless ($txn)
470 2 4 if ($error)
473 1 1 if (not $txn) { }
478 1 0 unless $self->{'AutoCommit'}
482 1 0 unless $self->{'AutoCommit'}
486 0 2 if $@
494 1 3 $wantarray ? :
512 0 0 unless @$all
513 0 0 if wantarray
525 0 7 unless $self->{'Active'}
531 0 7 unless $self->{'Active'}
534 2 5 unless @$all
535 2 3 if wantarray
541 0 2 unless $self->{'Active'}
548 0 4 unless $self->{'Active'}
555 2 2 if wantarray
566 2 25 if ref($_[0]) =~ /DBIx::ThinSQL/
567 0 25 if ref $_[0] eq 'SCALAR'
583 0 25 if defined $self->[1]
596 0 3 if ref($_[0]) =~ /DBIx::ThinSQL/
597 0 3 if ref $_[0] eq 'SCALAR'
613 0 3 if defined $self->[1]
642 0 31 if (ref $token eq 'ARRAY') { }
2 29 elsif (ref $token eq 'HASH') { }
650 0 2 if (ref $token->{$col} eq 'SCALAR') { }
1 1 elsif (ref $token->{$col} eq 'ARRAY') { }
1 0 elsif (defined $token->{$col}) { }
673 0 2 if (not defined $val) { }
1 1 elsif (ref $val eq 'ARRAY') { }
674 0 0 $not ? :
677 1 0 if $not
679 1 0 if @$val
683 0 1 $not ? :
1 0 unless $like or $not_like or $gtlt
739 0 68 if (ref $token eq 'ARRAY') { }
773 1 88 if ($ref =~ /^DBIx::ThinSQL/) { }
29 59 elsif ($ref eq 'ARRAY') { }
7 52 elsif ($ref eq 'HASH') { }
777 20 9 if ($word =~ /((SELECT)|(ORDER)|(GROUP))/) { }
0 9 elsif ($word =~ /INSERT/) { }
0 9 elsif ($word =~ /(^AS$)|(FROM)|(JOIN)/) { }
4 5 elsif ($word eq 'VALUES') { }
804 2 5 if ($word =~ /^((WHERE)|(ON))/) { }
1 4 elsif ($word eq 'SET') { }
4 0 elsif ($word eq 'VALUES') { }
822 0 1 ref $arg->{$_} eq 'SCALAR' ? :
846 0 8 ref $arg->{$_} eq 'SCALAR' ? :
862 0 34 if $@