Branch Coverage

lib/DBD/Safe.pm
Criterion Covered Total %
branch 49 62 79.0


line true false branch
27 0 2 if $DBD::Safe::drh
32 2 0 if ($DBI::VERSION > 1.53)
69 0 22 if ($$attr{'connect_cb'}) { }
22 0 elsif ($$attr{'dbi_connect_args'}) { }
80 28 0 if ($try == 1) { }
86 1 21 if $$attr{'retry_cb'}
89 2 20 if $$attr{'reconnect_cb'}
140 1 4 unless ($dbh->FETCH('AutoCommit'))
156 2 8 if ($dbh->FETCH('AutoCommit'))
161 5 3 unless $in_transaction
165 0 3 if ($in_transaction < 0)
171 0 3 if ($error)
176 1 2 if ($f eq 'rollback')
179 0 1 if ($last_reconnect > $tr_start)
185 2 0 if ($in_transaction == 0)
232 50 44 unless ($state and $$state{'dbh'} and $dont_check)
250 0 292 unless defined $attr
251 107 185 if $attr =~ /^(x_safe_|private_)/
252 116 69 if $$LOCAL_ATTRIBUTES{$attr}
259 215 69 if (_attr_is_local($attr)) { }
263 44 171 if ($attr eq 'Active')
281 8 0 if (_attr_is_local($attr)) { }
302 37 25 if ($$state{'dbh'}) { }
303 7 25 if (&$reconnect_cb($dbh) or defined $$state{'tid'} and $$state{'tid'} != 'threads'->tid or $$state{'pid'} != $$ or not is_connected($dbh))
312 1 11 if ($$state{'pid'} != $$)
320 37 25 if ($reconnect)
322 5 32 if ($$state{'dbh'} and not $dbh->FETCH('AutoCommit'))
332 28 4 if ($can_connect) { }
334 0 28 if (not $dbh) { }
380 0 28 if ($@) { }
387 2 26 if $INC{'threads.pm'}