Branch Coverage

blib/lib/Tie/DBI.pm
Criterion Covered Total %
branch 81 166 48.8


line true false branch
12 0 1 if $] < 5.007001
88 1 0 if (ref $_[0] eq 'HASH') { }
96 0 1 unless $dsn and $table and $key
98 1 0 defined $opt ? :
105 1 0 if (UNIVERSAL::isa($dsn, 'DBI::db')) { }
111 0 0 unless $dsn =~ /^dbi/
130 0 0 unless $dbh
133 0 1 if ($driver eq 'Oracle')
155 0 1 if defined $_[0]{'dbh'} and $_[0]{'needs_disconnect'}
164 1 21 if (@keys > 1) { }
167 1 0 unless ($s->{'CanBindSelect'})
170 0 1 if ($s->{'DoesIN'}) { }
179 21 0 unless $s->{'CanBindSelect'}
185 21 1 if (@keys == 1)
188 0 21 unless $r
203 1 0 @keys > 1 ? :
210 0 4 unless $st->execute
213 1 3 unless (defined $ref)
226 0 0 wantarray ? :
0 16 unless $st
228 3 13 unless ($r)
231 0 3 wantarray ? :
236 0 13 wantarray ? :
242 2 0 unless $s->{'CanBindSelect'}
244 0 2 unless $st
254 0 1 unless $s->{'CLOBBER'} > 2
257 0 1 unless $st->execute
265 0 1 unless $s->{'CLOBBER'} > 1
266 1 0 unless $s->{'CanBindSelect'}
280 0 13 unless ref $value eq 'HASH'
284 0 13 unless $s->{'CLOBBER'} > 0
289 5 25 if ($_ eq $s->{'key'})
290 0 5 if $s->{'WARN'}
293 0 25 unless ($ok->{$_})
294 0 0 if $s->{'WARN'}
299 0 13 unless @fields
305 0 13 if ($s->{'BrokenInsert'}) { }
306 0 0 $s->EXISTS($key) ? :
316 7 6 unless $result
318 0 13 if $s->error
323 0 13 unless %$value
370 0 1 unless $st->execute
385 0 69 if ($self->{'CanBind'})
386 0 0 unless (not $self->{'CanBindSelect'} and $query =~ /\bwhere\b/i)
388 0 0 unless $sth->execute(@bind_variables)
399 0 102 $self->{'CanBind'} ? :
102 0 defined $value ? :
405 7 62 unless $sth and $sth->execute
411 1 36 unless ($self->{'fields'})
416 0 1 unless $self->{'CannotListfields'}
419 0 0 unless (not $self->{'CannotListfields'} and defined $sth and $sth->execute)
422 0 1 unless $sth->execute
428 0 1 if ($self->{'CASESENSITIV'}) { }
443 56 1 if $self->{'types'}
446 0 1 if ($self->{'driver'} eq 'Oracle') { }
448 0 0 unless $sth->execute
459 0 1 unless $sth->execute
470 24 0 unless $s->{'CanBindSelect'}
473 0 24 unless @valid_fields
481 25 0 $valid->{$_} ? :
482 0 24 if ($s->{'ENCODING'})
485 23 1 @$fields == 1 ? :
489 0 24 @results > 1 ? :
502 6 7 $st ? :
509 7 0 unless $s->{'CanBindSelect'}
515 0 7 unless $st
522 0 20 if ($s->{'CanBind'})
523 0 0 if ($s->{'ENCODING'}) { }
532 20 0 unless ($noquote)
533 0 20 if ($s->{'ENCODING'}) { }
543 0 0 if $$noquote{$$types{$fields->[$i]}}
544 0 0 if ($s->{'driver'} eq 'Oracle' and $$types{$fields->[$i]} eq 'DATE') { }
560 0 57 if (my $noquote = $s->{'NoQuote'})
561 0 0 $$noquote{$types->{$field}} ? :
564 0 57 if ($s->{'driver'} eq 'Oracle' and $types->{$field} eq 'DATE') { }
574 0 57 if $s->{'ENCODING'}
582 16 5 if (exists $self->{$tag}) { }
583 0 5 unless $q
584 0 5 if $self->{'DEBUG'}
589 0 16 if $q
621 0 24 unless $s->{'table'}
641 0 0 unless $s->{'table'}{'CLOBBER'} > 1
665 0 23 if $s->{'table'}{'DEBUG'}