Branch Coverage

blib/lib/Log/Log4perl/Appender/DBI.pm
Criterion Covered Total %
branch 27 64 42.1


line true false branch
24 0 10 if (exists $p{$_}) { }
50 3 2 if ($p{'usePreparedStmt'}) { }
60 0 3 if ($self->{'usePreparedStmt'} and $self->{'bufferSize'})
74 0 5 if ($params{'dbh'}) { }
79 0 5 $params{'attrs'} ? :
0 5 unless "DBI"->connect(@params{"datasource", "username", "password"}, {"PrintError", 0, $params{'attrs'} ? %{$params{'attrs'};} : ()})
90 0 7 unless $stmt
110 0 10 unless ref $p{'message'}
116 4 6 if ($self->{'usePreparedStmt'}) { }
143 0 10 unless ($sth->execute(@qmarks))
150 0 0 if ($self->{'dbh'}->ping)
157 0 0 if ($attempt == $self->{'reconnect_attempts'})
163 0 0 $self->{'reconnect_attempts'} == 1 ? :
0 0 $self->{'reconnect_attempts'} == 1 ? :
166 0 0 unless ($self->{'dbh'}->ping)
168 0 0 if ($attempt)
170 0 0 if $self->{'reconnect_sleep'}
179 0 0 if ($self->{'usePreparedStmt'}) { }
181 0 0 if $self->{'sth'}
203 10 0 if ($self->{'bind_value_layouts'})
219 30 12 if ($self->{'bind_value_layouts'}{$pnum}) { }
12 0 elsif (ref $p->{'message'} eq 'ARRAY' and @{$p->{'message'};}) { }
0 0 elsif (ref $p->{'message'} eq 'ARRAY') { }
0 0 elsif (not ref $p->{'message'}) { }
247 0 42 if ($self->{'MAX_COL_SIZE'} and length $msg > $self->{'MAX_COL_SIZE'})
256 10 0 if (ref $p->{'message'} eq "ARRAY" and @{$p->{'message'};})
269 3 8 unless $self->{'BUFFER'} and ref $self->{'BUFFER'} eq "ARRAY"
271 4 4 if (scalar @{$self->{'BUFFER'};} >= $self->{'BUFFERSIZE'} * 2)
283 4 2 if ($stmt ne $prev_stmt)
284 0 4 if $sth
298 0 4 if ($dbh and not $dbh->{'AutoCommit'})
311 5 0 if ($self->{'_mine'} and $self->{'dbh'})