Condition Coverage

blib/lib/Template/Plugin/DBI.pm
Criterion Covered Total %
condition 29 78 37.1


and 3 conditions

line !l l&&!r l&&r condition
114 1 0 0 $$self{'_DBH'} and $$self{'_DBH_CONNECT'}
163 25 1 0 $self->connected and $$self{'_DBH_CONNECT'} eq $connect
183 27 0 0 $have_tvr and reap($$self{'_DBH'})
193 52 0 28 $$self{'_DBH'} && $$self{'_DBH'}->isa('DBI::db')
275 0 31 0 @args and $args[0]
0 0 31 @args and $args[0] and '' eq ref $args[0]
299 0 2 0 @_ == 1 && ref $_[0] eq 'ARRAY'
318 26 0 0 @args and $args[0]
0 0 0 @args and $args[0] and ref $args[0] eq 'HASH'
335 0 2 0 @_ == 1 && ref $_[0] eq 'ARRAY'
381 2 0 24 $self->connected and $$self{'_DBH_CONNECT'}
451 25 7 1 @_ == 1 && ref $_[0] eq 'ARRAY'

or 2 conditions

line l !l condition
106 0 29 $$params{'debug'} || 0
129 0 2 shift() || delete $$params{'data_source'} || delete $$params{'database'} || delete $$params{'connect'} || delete $$params{'dsn'} || delete $$params{'db'} || delete $$self{'_DSN'} || $ENV{'DBI_DSN'} || (return $self->_throw('data source not defined'))
155 0 26 $user ||= ''
156 0 26 $pass ||= ''
176 26 0 'DBI'->connect_cached($dsn, $user, $pass, $params) || (return $self->_throw("DBI connect failed: $DBI::errstr"))
251 0 0 $klobs || 0
0 0 $debug || 0
280 29 0 $self->dbh->prepare(@args) || (return $self->_throw('DBI prepare failed: ' . $self->dbh->errstr))
301 2 0 $$self{'_STH'} || (return $self->_throw('no query prepared'))

or 3 conditions

line l !l&&r !l&&!r condition
143 0 0 26 shift() || delete $$params{'username'} || delete $$params{'user'} || delete $$self{'_USER'}
149 0 0 26 shift() || delete $$params{'password'} || delete $$params{'pass'} || delete $$self{'_PASS'}
231 0 0 0 shift() || $$params{'table'} || $self->_throw('table not defined')
236 0 0 0 shift() || $$params{'key'} || $self->_throw('key not defined')
251 0 0 0 $$self{'_DBH'} || $$self{'_DSN'}
337 2 0 0 $self->dbh->do(@args) || $self->_throw('DBI do failed: ' . $self->dbh->errstr)
395 2 0 0 shift() || croak('DBI throw() called without an error string')
660 61 0 29 $sth->fetchrow_hashref || do { $$self{'LAST'} = 1; $$self{'NEXT'} = undef; return }