Branch Coverage

blib/lib/Pepper/DB.pm
Criterion Covered Total %
branch 0 50 0.0


line true false branch
29 0 0 if (ref $config ne 'HASH' or not $config->{'database_username'} or not $config->{'database_password'})
58 0 0 if $self->{'dbh'} and &blessed($self->{'dbh'}) =~ /DBI/ and time - $self->{'connect_time'} < 5 || $self->{'dbh'}->ping
71 0 0 unless $self->{'dbh'} = 'DBI'->connect($dsn, $self->{'config'}{'database_username'}, $self->{'config'}{'database_password'}, {'PrintError', 0, 'RaiseError', 1, 'AutoCommit', 0, 'mysql_enable_utf8', 8})
95 0 0 unless $database_name
98 0 0 if $database_name =~ /[^a-z0-9\_]/i
121 0 0 if (not $results->[0]) { }
148 0 0 unless ($self->{'dbh'})
153 0 0 unless $sth = $self->{'dbh'}->prepare($sql)
162 0 0 if ($bind_values) { }
170 0 0 if ($_ =~ /Deadlock/) { }
186 0 0 if ($sql =~ /^select|^show|^desc/i) { }
0 0 elsif ($sql =~ /^(insert|replace)/i) { }
221 0 0 unless ($self->{'dbh'})
228 0 0 if ($bind_values) { }
229 0 0 unless $sth->execute(@$bind_values)
232 0 0 unless $sth->execute
269 0 0 unless ($self->{'dbh'})
277 0 0 if ($bind_values->[0]) { }
278 0 0 unless $sth->execute(@$bind_values)
280 0 0 unless $sth->execute
301 0 0 unless ($names->[0])
317 0 0 unless ($self->{'dbh'})
325 0 0 if ($bind_values->[0]) { }
326 0 0 unless $sth->execute(@$bind_values)
328 0 0 unless $sth->execute