Branch Coverage

blib/lib/DBIx/DBO.pm
Criterion Covered Total %
branch 101 122 82.7


line true false branch
23 0 11 if ($] < 5.009005) { }
101 1 13 if (@_ & 1)
106 5 1 if (exists $Config{$opt}) { }
143 1 18 if @_ > 3
146 1 17 if (defined $new and not UNIVERSAL::isa($new, 'HASH'))
149 11 6 if (defined $dbh)
150 1 10 unless _isa($dbh, 'DBI::db')
154 6 10 if (defined $rdbh)
155 1 5 unless _isa($rdbh, 'DBI::db')
156 1 4 if $dbh and $$dbh{'Driver'}{'Name'} ne $$rdbh{'Driver'}{'Name'}
161 1 13 unless $$new{'dbd'}
175 4 4 if (ref $me)
176 1 3 if $$me{'dbh'}
177 2 1 if @_
178 1 1 if ($me->config('AutoReconnect')) { }
179 0 1 unless defined $$me{'ConnectArgs'}
182 1 0 if defined $$me{'ConnectArgs'}
186 0 2 unless $$me{'dbh'} = $me->_connect($conn, @_)
190 1 3 if $me->config('AutoReconnect')
191 0 4 unless my $dbh = $me->_connect($conn, @_)
198 11 1 if (ref $me)
200 7 4 if @_
201 4 5 if ($me->config('AutoReconnect')) { }
202 2 2 unless defined $$me{'ConnectReadOnlyArgs'}
205 2 3 if defined $$me{'ConnectReadOnlyArgs'}
209 0 7 unless $$me{'rdbh'} = $me->_connect($conn, @_)
213 0 1 if $me->config('AutoReconnect')
214 0 1 unless my $dbh = $me->_connect($conn, @_)
221 1 8 unless my $driver = ('DBI'->parse_dsn($dsn))[1]
225 2 6 unless ref($me) =~ /::DBD::\Q$driver\E$/ or $driver eq $$me{'dbd'}
236 11 6 if (@_) { }
4 2 elsif (defined $conn_idx and $ConnectArgs[$conn_idx]) { }
238 2 9 if ref $attr eq 'HASH'
242 0 0 if ($Config{'DebugSQL'} > 1)
246 0 0 if $_[1]{'PrintError'}
247 0 0 if $_[1]{'RaiseError'}
249 5 6 unless exists $attr{'HandleError'}
256 3 8 if defined $conn_idx
373 0 24 unless defined $table and length $table
376 2 22 if (_isa($table, 'DBIx::DBO::Table')) { }
377 1 1 if $$table{'DBO'} != $me
380 4 18 ref $table eq 'ARRAY' ? :
381 20 2 unless defined $schema
383 11 11 defined $schema ? :
6 16 unless exists $$me{'TableInfo'}{defined $schema ? $schema : ''}{$table}
386 11 11 defined $schema ? :
397 3 1 if ($$me{'dbh'})
401 3 1 if ($$me{'rdbh'})
432 10 258 defined $$me{'rdbh'} ? :
433 292 10 $type ne 'read-only' ? :
434 2 300 unless defined $$me{$d}
436 1 299 if exists $$me{$c} and not $$me{$d}->ping
509 37 362 if (@_ > 2)
510 15 22 ref $me ? :
514 353 9 ref $me ? :
521 8 8 unless ref $$me{'dbh'} or ref $$me{'rdbh'}
524 8 0 if defined $stash{'dbh'}
525 0 8 if defined $stash{'rdbh'}
527 0 16 if defined $stash{$_}
538 0 8 if ($me->config('AutoReconnect')) { }
540 0 0 if $$me{$_}