Branch Coverage

blib/lib/Tie/Array/DBD.pm
Criterion Covered Total %
branch 126 170 74.1


line true false branch
74 14 14 $self->{'ro'} == 1 ? :
92 0 16 if $exists
94 0 16 if $cnf->{'ro'}
96 0 16 unless $cnf->{'tmp'}
97 8 8 unless $dbt eq "CSV" or $dbt eq "Unify"
103 0 16 if $dbt eq "Unify"
109 0 60 unless my $dsn = shift()
112 0 60 ref $dsn ? :
0 56 unless my $dbh = ref $dsn ? $dsn->clone : "DBI"->connect($dsn, undef, undef, {"PrintError", 1, "RaiseError", 1, "PrintWarn", 0, "FetchHashKeyName", "NAME_lc"})
122 0 56 unless my $cnf = $DB{$dbt}
128 28 28 if exists $cnf->{'autoc'}
129 0 56 if $dbt eq "Oracle"
144 54 2 if ($opt)
145 0 54 unless ref $opt eq "HASH"
147 0 54 if $opt->{'key'}
148 0 54 if $opt->{'fld'}
149 0 54 if $opt->{'tbl'}
150 0 54 if $opt->{'vtp'}
152 0 54 if exists $opt->{'ro'}
154 52 2 if (my $str = $opt->{'str'})
155 4 48 if ($str eq 'Sereal') { }
4 44 elsif ($str eq 'Storable') { }
4 40 elsif ($str eq 'FreezeThaw') { }
4 36 elsif ($str eq 'JSON') { }
4 32 elsif ($str eq 'JSON::MaybeXS') { }
4 28 elsif ($str eq 'JSON::SIMD') { }
4 24 elsif ($str eq 'JSON::Syck') { }
4 20 elsif ($str eq 'JSON::XS') { }
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') { }
237 16 0 unless ($h->{'tbl'})
246 16 0 unless $h->{'ro'}
247 16 0 unless $h->{'ro'}
248 16 0 unless $h->{'ro'}
252 16 0 unless $h->{'ro'}
254 8 8 unless (exists $cnf->{'pbind'} and not $cnf->{'pbind'})
275 0 1106 unless defined $val
277 948 158 if $self->{'_en'}
283 0 3094 unless defined $val
285 2652 442 if $self->{'_de'}
293 30 0 if (my $r = $sth->fetch) { }
294 14 16 defined $r->[0] ? :
304 28 1106 if $self->{'ro'}
308 14 1092 $self->EXISTS($key) ? :
309 938 168 if $key > $self->{'max'}
314 0 224 if $self->{'ro'}
316 0 224 unless my $r = $self->{'sel'}->fetch
318 14 210 if $key >= $self->{'max'}
324 0 42 if $self->{'ro'}
332 0 140 if $self->{'ro'}
339 952 182 unless $key <= $self->{'max'}
341 28 154 $self->{'sel'}->fetch ? :
346 28 2898 unless $key <= $self->{'max'}
348 28 2870 unless my $r = $self->{'sel'}->fetch
354 0 28 if $self->{'ro'}
361 0 14 if $self->{'ro'}
362 0 14 unless $self->{'max'} >= 0
368 0 14 if $self->{'ro'}
377 0 28 unless @val
378 0 28 if $self->{'ro'}
412 0 210 if $self->{'ro'}
414 28 182 if ($nargs == 0)
415 14 14 if (wantarray)
426 14 168 if $off < 0
427 14 168 if $off < 0
431 42 126 if ($nargs == 1)
432 14 28 if $off > $self->{'max'}
434 14 14 if (wantarray)
445 42 84 if $nargs == 2 and $off > $self->{'max'}
447 28 56 $len < 0 ? :
448 0 84 if $nargs == 2 and $last > $self->{'max'}
456 28 56 if (@new)
463 70 14 wantarray ? :
468 0 0 unless $self->{'max'} >= 0
474 0 0 if exists $self->{'min'} and $self->{'min'} < $self->{'max'}
495 42 14 if @_
511 0 16 unless my $dbh = $self->{'dbh'}
513 0 112 unless $self->{$_}
519 16 0 if ($self->{'tmp'})
520 8 8 unless $dbh->{'AutoCommit'}
521 0 16 if $self->{'ro'}
524 8 8 unless $dbh->{'AutoCommit'}