Branch Coverage

blib/lib/Template/Plugin/DBI.pm
Criterion Covered Total %
branch 43 88 48.8


line true false branch
50 0 1 if $INC{'threads.pm'}
56 0 1 if $have_tvr
76 0 26 ref $class ? :
84 19 7 if @connect_args
101 27 2 ref $_[-1] eq 'HASH' ? :
105 0 29 if exists $$params{'debug'}
111 1 28 if ($dbh = $$params{'dbh'}) { }
114 0 1 if $$self{'_DBH'} and $$self{'_DBH_CONNECT'}
141 1 25 unless $dsn =~ /^dbi:/i
163 0 26 if $self->connected and $$self{'_DBH_CONNECT'} eq $connect
171 10 16 unless defined $$params{'PrintError'}
173 10 16 unless defined $$params{'RaiseError'}
183 0 27 if $have_tvr and reap($$self{'_DBH'})
206 3 25 if $self->connected
225 0 0 ref $_[-1] eq 'HASH' ? :
229 0 0 if $@
243 0 0 unless defined $klobs
248 0 0 unless defined $debug
249 0 0 unless defined $debug
275 0 31 unless (@args and $args[0] and '' eq ref $args[0])
299 0 2 @_ == 1 && ref $_[0] eq 'ARRAY' ? :
318 0 0 if (@args and $args[0] and ref $args[0] eq 'HASH')
335 0 2 @_ == 1 && ref $_[0] eq 'ARRAY' ? :
365 2 31 unless $$self{'_DBH'}
381 24 2 if $self->connected and $$self{'_DBH_CONNECT'}
405 0 0 unless $self->connected
411 0 0 if $@
420 0 0 unless $self->connected
425 0 0 if $@
451 1 32 @_ == 1 && ref $_[0] eq 'ARRAY' ? :
453 0 33 unless $$self{'_STH'}->execute(@args)
468 0 127 unless blessed $self
469 0 127 unless defined $$self{'_STH'}
521 0 30 if $Template::Plugin::DBI::DEBUG
526 0 30 if $Template::Plugin::DBI::DEBUG
548 59 30 if $$self{'FIRST'}
551 29 60 unless $data = $$self{'NEXT'}
569 0 1 $$self{'_STARTED'} ? :
580 0 2 if $sth->err
581 1 1 if $$self{'NEXT'}
595 0 0 if $sth->err
606 0 0 if $sth->err
617 0 0 if $sth->err
618 0 0 if ($$self{'NEXT'})