Branch Coverage

blib/lib/CPAN/Testers/Common/DBUtils.pm
Criterion Covered Total %
branch 44 98 44.9


line true false branch
118 0 1 unless $hash{'driver'}
119 0 1 unless $hash{'database'} or $hash{'dbfile'}
123 0 1 defined $hash{'AutoCommit'} ? :
158 0 6 unless $sql
162 0 6 unless $$dbv{'dbh'}
167 0 6 if ($@ or not $sth)
176 0 6 if ($@ or not $res)
183 5 1 if ($type eq 'array') { }
214 0 2 unless $sql
218 0 2 unless $$dbv{'dbh'}
223 0 2 if ($@ or not $sth)
232 0 2 if ($@ or not $res)
238 1 1 if ($type eq 'array') { }
240 8 1 if (my $row = $sth->fetchrow_arrayref) { }
245 8 1 if (my $row = $sth->fetchrow_hashref) { }
293 1 8 unless $sql
297 1 7 unless $$dbv{'dbh'}
299 0 8 if ($idrequired) { }
303 0 0 if ($@ or not $sth)
312 0 0 if ($@ or not $res)
317 0 0 if ($$dbv{'driver'} =~ /mysql/i) { }
0 0 elsif ($$dbv{'driver'} =~ /pg/i) { }
0 0 elsif ($$dbv{'driver'} =~ /sqlite/i) { }
326 0 0 if $row = $sth->fetchrow_arrayref
329 0 0 if $row = $sth->fetchrow_arrayref
334 0 8 if ($@)
371 2 3 unless $sql and @args
375 0 3 unless $$dbv{'dbh'}
382 1 1 unless $dbv and $$dbv{'repeat'}
395 0 1 unless $sql
399 0 1 unless $$dbv{'dbh'}
404 0 1 if ($@ or not $sth)
414 0 3 if ($@ or not $res)
433 0 0 if $$dbv{'dbh'}
447 0 1 unless $_[0]
450 0 1 if $$dbv{'driver'} =~ /csv/i
454 0 1 unless $$dbv{'dbh'}
505 0 1 if ($$dbv{'driver'} =~ /ODBC/) { }
1 0 elsif ($$dbv{'driver'} =~ /SQLite/i) { }
509 1 0 if $$dbv{'database'}
510 0 1 if $$dbv{'dbhost'}
511 0 1 if $$dbv{'dbport'}
516 0 0 if $$dbv{'dbfile'}
517 0 0 if $$dbv{'database'}
518 0 0 if $$dbv{'dbhost'}
519 0 0 if $$dbv{'dbport'}
526 0 1 if $@
533 1 0 if defined $$dbv{'dbh'}
538 0 0 unless $_