Branch Coverage

blib/lib/Tie/Array/DBD.pm
Criterion Covered Total %
branch 98 128 76.5


line true false branch
86 0 12 if $exists
89 0 12 unless $cnf->{'tmp'}
90 6 6 unless $dbt eq "CSV" or $dbt eq "Unify"
96 0 12 if $dbt eq "Unify"
102 0 48 unless my $dsn = shift()
105 0 48 ref $dsn ? :
0 44 unless my $dbh = ref $dsn ? $dsn->clone : "DBI"->connect($dsn, undef, undef, {"PrintError", 1, "RaiseError", 1, "PrintWarn", 0, "FetchHashKeyName", "NAME_lc"})
115 0 44 unless my $cnf = $DB{$dbt}
121 22 22 if exists $cnf->{'autoc'}
122 0 44 if $dbt eq "Oracle"
136 42 2 if ($opt)
137 0 42 unless ref $opt eq "HASH"
139 0 42 if $opt->{'key'}
140 0 42 if $opt->{'fld'}
141 0 42 if $opt->{'tbl'}
142 0 42 if $opt->{'vtp'}
144 40 2 if (my $str = $opt->{'str'})
145 4 36 if ($str eq 'Sereal') { }
4 32 elsif ($str eq 'Storable') { }
4 28 elsif ($str eq 'FreezeThaw') { }
4 24 elsif ($str eq 'JSON') { }
4 20 elsif ($str eq 'JSON::Syck') { }
4 16 elsif ($str eq 'YAML') { }
4 12 elsif ($str eq 'YAML::Syck') { }
0 12 elsif ($str eq 'Data::Dumper') { }
4 8 elsif ($str eq 'XML::Dumper') { }
4 4 elsif ($str eq 'Bencode') { }
209 12 0 unless ($h->{'tbl'})
226 6 6 unless (exists $cnf->{'pbind'} and not $cnf->{'pbind'})
247 0 780 unless defined $val
249 624 156 if $self->{'_en'}
255 0 2200 unless defined $val
257 1760 440 if $self->{'_de'}
265 22 0 if (my $r = $sth->fetch) { }
266 10 12 defined $r->[0] ? :
279 10 770 $self->EXISTS($key) ? :
280 660 120 if $key > $self->{'max'}
286 0 160 unless my $r = $self->{'sel'}->fetch
288 10 150 if $key >= $self->{'max'}
307 670 130 unless $key <= $self->{'max'}
309 20 110 $self->{'sel'}->fetch ? :
314 0 2060 unless $key <= $self->{'max'}
316 20 2040 unless my $r = $self->{'sel'}->fetch
330 0 10 unless $self->{'max'} >= 0
344 0 20 unless @val
379 20 130 if ($nargs == 0)
380 10 10 if (wantarray)
391 10 120 if $off < 0
392 10 120 if $off < 0
396 30 90 if ($nargs == 1)
397 10 20 if $off > $self->{'max'}
399 10 10 if (wantarray)
410 30 60 if $nargs == 2 and $off > $self->{'max'}
412 20 40 $len < 0 ? :
413 0 60 if $nargs == 2 and $last > $self->{'max'}
421 20 40 if (@new)
428 50 10 wantarray ? :
433 0 0 unless $self->{'max'} >= 0
439 0 0 if exists $self->{'min'} and $self->{'min'} < $self->{'max'}
470 0 12 unless my $dbh = $self->{'dbh'}
472 0 84 unless $self->{$_}
478 12 0 if ($self->{'tmp'})
479 6 6 unless $dbh->{'AutoCommit'}
482 6 6 unless $dbh->{'AutoCommit'}