Branch Coverage

blib/lib/Tie/Hash/DBD.pm
Criterion Covered Total %
branch 95 126 75.4


line true false branch
92 2 19 if $exists
95 3 16 unless $cnf->{'tmp'}
96 10 9 unless $dbt eq 'CSV' or $dbt eq 'Unify'
102 0 19 if $dbt eq 'Unify'
108 0 77 unless my $dsn = shift()
111 0 77 ref $dsn ? :
0 53 unless my $dbh = ref $dsn ? $dsn->clone : 'DBI'->connect($dsn, undef, undef, {'PrintError', 1, 'RaiseError', 1, 'PrintWarn', 0, 'FetchHashKeyName', 'NAME_lc'})
121 0 53 unless my $cnf = $DB{$dbt}
127 27 26 if exists $cnf->{'autoc'}
128 0 53 if $dbt eq 'Oracle'
144 45 8 if ($opt)
145 0 45 unless ref $opt eq 'HASH'
147 0 45 if $opt->{'key'}
148 0 45 if $opt->{'fld'}
149 5 40 if $opt->{'tbl'}
150 0 45 if $opt->{'trh'}
151 0 45 if $opt->{'ktp'}
152 0 45 if $opt->{'vtp'}
154 40 5 if (my $str = $opt->{'str'})
155 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') { }
218 0 21 if $h->{'trh'}
220 5 16 if ($h->{'tbl'}) { }
221 3 2 unless $h->{'trh'} or $dbt eq 'CSV' or $dbt eq 'Unify'
238 10 11 unless (exists $cnf->{'pbind'} and not $cnf->{'pbind'})
257 2 4968 unless defined $val
259 64 4904 if $self->{'_en'}
265 4 5062 unless defined $val
267 120 4942 if $self->{'_de'}
273 0 4970 $self->{'asc'} ? :
275 485 4485 unless $self->{'dbt'} eq 'SQLite'
278 20 4950 $self->EXISTS($key) ? :
279 0 4970 if $self->{'trh'}
285 0 12 if $self->{'asc'}
286 6 6 unless $self->{'dbt'} eq 'SQLite'
289 0 12 unless ($r)
290 0 0 if $self->{'trh'}
295 0 12 if $self->{'trh'}
306 0 9906 if $self->{'asc'}
308 4946 4960 $self->{'sel'}->fetch ? :
313 0 5054 if $self->{'asc'}
315 0 5054 unless my $r = $self->{'sel'}->fetch
321 25 26 unless $self->{'dbt'} eq 'SQLite'
323 0 51 if $self->{'trh'}
324 12 39 unless (@{$self->{'key'};})
325 0 12 if $self->{'trh'}
328 0 39 if ($self->{'asc'})
336 39 4917 unless (@{$self->{'key'};})
337 0 39 if $self->{'trh'}
346 0 10 unless my $r = $self->{'cnt'}->fetch
357 0 21 unless my $dbh = $self->{'dbh'}
359 0 126 unless $self->{$_}
365 18 3 if ($self->{'tmp'})
366 8 10 unless $dbh->{'AutoCommit'}
369 8 13 unless $dbh->{'AutoCommit'}