Branch Coverage

blib/lib/DBIx/DWIW.pm
Criterion Covered Total %
branch 0 342 0.0


line true false branch
236 0 0 if ($$self{'SAFE'})
238 0 0 unless ($method =~ s/^dbi_//)
245 0 0 if ($$self{'DBH'} and $$self{'DBH'}->can($method)) { }
265 0 0 if ($arg eq 'unsafe') { }
0 0 elsif ($arg eq 'safe') { }
309 0 0 if (not defined $a) { }
0 0 elsif (not defined $b) { }
0 0 elsif (not $a) { }
0 0 elsif (not $b) { }
0 0 elsif ($a < $b) { }
488 0 0 if (@_ == 2 and $_[0] eq 'Slave' || $_[0] eq 'ReadOnly')
499 0 0 if (@_ % 2 != 0) { }
502 0 0 if (my $config = $class->LocalConfig($config_name)) { }
518 0 0 if ($use_slave_hack)
525 0 0 if ($UseSlave)
527 0 0 if ($class->can('FindSlave')) { }
554 0 0 unless defined $Password
556 0 0 unless defined $config_name
559 0 0 if $ENV{'DB_DOWN'}
568 0 0 if (exists $Options{'Host'}) { }
577 0 0 unless ($DB)
580 0 0 unless $NoAbort
584 0 0 unless ($User)
587 0 0 unless $NoAbort
591 0 0 unless (defined $Password)
594 0 0 unless $NoAbort
609 0 0 if (defined $Host) { }
627 0 0 if ($Options{'Proxy'}) { }
629 0 0 unless ($Options{'ProxyHost'} and $Options{'ProxyPort'})
632 0 0 unless $NoAbort
641 0 0 if ($Options{'ProxyCipher'} and $Options{'ProxyKey'})
654 0 0 if ($Port) { }
664 0 0 if $ENV{'DEBUG'}
670 0 0 unless ($Unique)
672 0 0 if (my $db = $CurrentConnections{$dsn . $class})
674 0 0 if (defined $Verbose)
684 0 0 if ($Host and my $Override = $ConnectTimeoutOverrideByHost{$Host}) { }
0 0 elsif ($ConnectTimeoutOverride) { }
693 0 0 if ($Host and my $Override = $QueryTimeoutOverrideByHost{$Host}) { }
0 0 elsif ($QueryTimeoutOverride) { }
730 0 0 if ($ENV{'DBIxDWIW_VERBOSE'})
734 0 0 if (my $routine = $self->can('PreConnectHook'))
738 0 0 if ($ENV{'DBIxDWIW_CONNECTION_DEBUG'})
763 0 0 if ($$self{'CONNECT_TIMEOUT'}) { }
773 0 0 if ($@ eq "alarm\n")
775 0 0 if (my $routine = $self->can('ConnectTimeoutHook'))
792 0 0 if (not ref $dbh) { }
794 0 0 if (not $DBI::errstr and $@)
805 0 0 if ($Retry and $DBI::errstr =~ /can\'t connect/i || $DBI::errstr =~ /Too many connections/i || $DBI::errstr =~ /Lost connection to MySQL server/i and $self->RetryWait($DBI::errstr)) { }
829 0 0 if ($ERROR =~ /^Cannot log in to DBI::ProxyServer: Unexpected EOF from server/)
832 0 0 if (not $NoAbort) { }
0 0 elsif (not $Quiet) { }
864 0 0 unless ($Unique)
889 0 0 if defined $$self{$key}
910 0 0 if (defined $time)
915 0 0 if $$self{'VERBOSE'}
934 0 0 unless ($$self{'UNIQUE'})
939 0 0 unless ($$self{'DBH'})
948 0 0 if (defined $$self{'RecentExecutedSth'})
953 0 0 if (not $$self{'DBH'}->disconnect) { }
993 0 0 if (wantarray)
998 0 0 if (@ret > 1)
1042 0 0 if (@values == 1) { }
0 0 elsif (@values > 1) { }
1088 0 0 unless (ref $statement)
1091 0 0 unless $$self{'QUIET'}
1097 0 0 if $$self{'VERBOSE'}
1120 0 0 if ($$self{'QUERY_TIMEOUT'}) { }
1130 0 0 if ($@ eq "alarm\n")
1132 0 0 if (my $routine = $self->can('ExecuteTimeoutHook'))
1151 0 0 if (not defined $$self{'ExecuteReturnCode'}) { }
1155 0 0 if (not $$self{'TrxRunning'} and $$self{'RETRY'} and $err =~ /Lost connection/ || $err =~ /server has gone away/ || $err =~ /Server shutdown in progress/)
1166 0 0 if ($self->RetryWait($err))
1177 0 0 if $$self{'VERBOSE'}
1192 0 0 if $$self{'VERBOSE'}
1223 0 0 unless ($$self{'DBH'})
1226 0 0 unless $$self{'QUIET'}
1231 0 0 if (ref $sql) { }
1237 0 0 if $$self{'VERBOSE'}
1280 0 0 unless ($$self{'DBH'})
1284 0 0 unless ($$self{'QUIET'})
1293 0 0 if ($$self{'VERBOSE'})
1300 0 0 $has_bind ? :
1357 0 0 if ($$self{'RecentExecutedSth'} and defined $$self{'RecentExecutedSth'}{'mysql_insertid'}) { }
1387 0 0 if ($$self{'RecentExecutedSth'}) { }
1406 0 0 if ($$self{'RecentExecutedSth'}) { }
1426 0 0 if ($$self{'RecentpreparedSth'}) { }
1484 0 0 unless ($$self{'DBH'})
1490 0 0 if $$self{'VERBOSE'}
1494 0 0 if ($sql eq '' or $self->Execute($sql, @bind_vals))
1499 0 0 unless ($result)
1501 0 0 if ($sth->err) { }
1512 0 0 $result ? :
1546 0 0 unless ($$self{'DBH'})
1552 0 0 if $$self{'VERBOSE'}
1556 0 0 if ($self->Execute($sql, @bind_vals))
1595 0 0 unless ($$self{'DBH'})
1601 0 0 if $$self{'VERBOSE'}
1605 0 0 if ($self->Execute($sql, @bind_vals))
1610 0 0 unless (@result)
1612 0 0 if ($sth->err) { }
1659 0 0 unless ($$self{'DBH'})
1665 0 0 if $$self{'VERBOSE'}
1669 0 0 if ($self->Execute($sql, @bind_vals))
1722 0 0 unless ($$self{'DBH'})
1728 0 0 if $$self{'VERBOSE'}
1732 0 0 if ($self->Execute($sql, @bind_vals))
1761 0 0 unless ($$self{'DBH'})
1767 0 0 if $$self{'VERBOSE'}
1771 0 0 if ($self->Execute($sql, @bind_vals))
1810 0 0 unless ($$self{'DBH'})
1816 0 0 if $$self{'VERBOSE'}
1818 0 0 if ($self->Execute($sql, @bind_vals))
1822 0 0 if ($sth->rows > 1 or $$sth{'NUM_OF_FIELDS'} > 1)
1863 0 0 unless ($$self{'DBH'})
1869 0 0 if $$self{'VERBOSE'}
1871 0 0 if ($self->Execute($sql))
1880 0 0 if (defined $_) { }
1882 0 0 $$sth{'mysql_type_name'}[$col++] =~ /(char|text|binary|blob)/ ? :
1917 0 0 if (@_)
1940 0 0 if (@_)
1977 0 0 if (@_)
2032 0 0 if ($$self{'RetryCount'} > 9)
2040 0 0 if ($$self{'RetryCount'}++ <= 2) { }
0 0 elsif (not $$self{'RetryStart'}) { }
2051 0 0 unless ($$self{'QUIET'})
2070 0 0 if (not $$self{'QUIET'} and $$self{'RetryCount'} > 1)
2077 0 0 if ($$self{'RetryCommand'})
2094 0 0 if $$self{'RetryCommand'}
2173 0 0 if (my $DbConfig = $class->LocalConfig($DB))
2194 0 0 if (my $DbConfig = $class->LocalConfig($DB))
2213 0 0 if (my $DbConfig = $class->LocalConfig($DB))
2215 0 0 if (defined $$DbConfig{'Pass'})
2235 0 0 if (my $DbConfig = $class->LocalConfig($DB))
2237 0 0 if ($$DbConfig{'Host'})
2257 0 0 if (my $DbConfig = $class->LocalConfig($DB))
2259 0 0 if ($$DbConfig{'Port'})
2261 0 0 if ($$DbConfig{'Host'} eq hostname()) { }
2292 0 0 if ($$self{'TrxRunning'})
2294 0 0 if $$self{'VERBOSE'}
2295 0 0 if ($$self{'BeginCount'} and not defined $name) { }
2297 0 0 if $$self{'VERBOSE'}
2302 0 0 if $$self{'VERBOSE'}
2308 0 0 if $$self{'VERBOSE'}
2311 0 0 if (defined $name) { }
2314 0 0 if $$self{'VERBOSE'}
2319 0 0 if $$self{'VERBOSE'}
2342 0 0 unless ($$self{'TrxRunning'})
2344 0 0 if $$self{'VERBOSE'}
2349 0 0 if ($$self{'BeginCount'})
2352 0 0 if (defined $name)
2354 0 0 if $$self{'VERBOSE'}
2363 0 0 if ($$self{'BeginCount'} == 0) { }
0 0 elsif ($$self{'BeginCount'} > 0) { }
2365 0 0 if $$self{'VERBOSE'}
2376 0 0 if $$self{'VERBOSE'}
2381 0 0 if $$self{'VERBOSE'}
2391 0 0 if (defined $$self{'TrxName'}) { }
2394 0 0 unless (defined $name)
2396 0 0 if $$self{'VERBOSE'}
2402 0 0 if ($name ne $$self{'TrxName'})
2404 0 0 if $$self{'VERBOSE'}
2412 0 0 if ($name eq $$self{'TrxName'})
2414 0 0 if $$self{'VERBOSE'}
2429 0 0 if $$self{'VERBOSE'}
2448 0 0 unless ($$self{'TrxRunning'})
2450 0 0 if $$self{'VERBOSE'}
2461 0 0 if $$self{'VERBOSE'}
2504 0 0 if ($$self{'SAFE'})
2506 0 0 unless ($method =~ s/^dbi_//)
2512 0 0 if ($$self{'DBI_STH'} and $$self{'DBI_STH'}->can($method)) { }