Branch Coverage

blib/lib/DBD/Multi.pm
Criterion Covered Total %
branch 53 72 73.6


line true false branch
26 0 10 if $DBD::Multi::drh
61 112 1 $attr->{'dsns'} && ref $attr->{'dsns'} eq 'ARRAY' ? :
64 0 113 if ($dbname =~ /dsn=(.*)/)
72 0 113 if exists $attr->{'failed_max'}
74 1 112 if exists $attr->{'failed_expire'}
104 24 412 unless ($_sth)
131 0 0 if ($dbh->FETCH('Active'))
132 0 0 if $dbh->FETCH('_dbh')
139 0 0 if ($dbh->FETCH('Active'))
140 0 0 if $dbh->FETCH('_dbh')
197 5 405 @_ ? :
199 1 409 if $sth->FETCH('Active')
205 3 1637 unless not defined $value or defined $sth->FETCH($field)
215 1634 817 unless $sth->{'_sth'}->FETCH($attrib)
304 113 0 unless defined $self->nextid
309 113 0 unless defined $self->failed_max
310 113 0 unless defined $self->failed_expire
311 113 0 unless defined $self->timeout
336 441 6 if $dbh
355 791 175 unless $self->failed->{$dsource}
356 1 174 if ($now - $self->failed_last->{$dsource} > $self->failed_expire)
371 448 118 if (defined $dsource)
379 0 2 if grep({$self->failed->{$_} >= $self->failed_max;} keys %{$self->failed;}) < keys %{$self->all_dsources;}
392 174 637 if exists $self->failed->{$_}
395 118 448 if @used == @dsources and @failed == @dsources
398 271 177 if @used == @dsources
402 1 484 if $self->failed->{$dsource} and $self->failed->{$dsource} >= $self->failed_max
403 36 448 if $self->used->{$dsource}
417 0 234 unless my $dsource = shift @{$dsources;}
424 450 84 unless ($dsource)
430 55 477 if UNIVERSAL::isa($dsource, 'DBI::db')
433 213 264 if (ref $dsource eq 'CODE')
435 207 6 if UNIVERSAL::isa($handle, 'DBI::db')
441 0 263 if (&timeout_call(scalar $self->timeout, sub { $dbh = 'DBI'->connect_cached(@{$dsource;}); } ))
459 0 84 unless $dbh
460 12 72 if ($dbh->{'handler'})