Branch Coverage

blib/lib/Class/Persistent/Plugin/MySQL.pm
Criterion Covered Total %
branch 1 102 0.9


line true false branch
23 0 1 ref $class ? :
24 0 0 unless my $dbh = 'DBI'->connect($dsn, $user, $passwd, {'PrintError', 0, 'RaiseError', 0})
46 0 0 if (@_ != 2)
52 0 0 unless ref $class
58 0 0 unless $sth = $dbh->prepare("SELECT max(_id) FROM $db_pkg")
61 0 0 if (not $sth->execute) { }
76 0 0 if (@_ < 3 or @_ > 4)
82 0 0 unless ref $class
83 0 0 unless ref $out
91 0 0 if ($sth) { }
94 0 0 if (not $set_val) { }
107 0 0 $type ? :
0 0 unless $sth = $dbh->prepare("SELECT * FROM $db_pkg" . ($type ? " WHERE $type" : ''))
110 0 0 if (not $sth->execute) { }
123 0 0 if ($ret_val == 0)
134 0 0 if (@_ != 1)
145 0 0 if ($key =~ /^(.*)_type$/) { }
160 0 0 if (@_ != 3)
166 0 0 unless ref $class
167 0 0 unless ref $out
199 0 0 unless $sth = $dbh->prepare($statement)
212 0 0 if (@_ != 3)
218 0 0 unless ref $class
219 0 0 unless ref $out
247 0 0 unless $sth = $dbh->prepare($statement)
260 0 0 if (@_ != 3)
266 0 0 unless ref $class
267 0 0 unless ref $out
278 0 0 unless $sth = $dbh->prepare($statement)
286 0 0 if (@_ != 3)
292 0 0 unless ref $class
293 0 0 unless ref $out
309 0 0 unless $sth = $dbh->prepare($statement)
323 0 0 unless $sth = $dbh->prepare($statement)
332 0 0 if ($key =~ /_type$/)
337 0 0 if ($$vals{$key . '_type'} eq 'c')
339 0 0 if ($$vals{$key} eq $id)
353 0 0 if (@_ != 1)
359 0 0 unless ref $class
369 0 0 unless $sth = $dbh->prepare($statement)
383 0 0 unless $sth = $dbh->prepare($statement)
390 0 0 if ($count == 0)
400 0 0 unless $sth = $dbh->prepare($statement)
407 0 0 unless $sth = $dbh->prepare($statement)
416 0 0 if (@_ != 3)
427 0 0 unless $sth = $dbh->prepare($statement)
434 0 0 unless $sth = $dbh->prepare($statement)
447 0 0 if ($$types{$field} eq 'n') { }
0 0 elsif ($$types{$field} eq 's' or $$types{$field} eq 'c') { }
465 0 0 unless $sth = $dbh->prepare($statement)
475 0 0 unless $$class{'_dbh'}->disconnect