Branch Coverage

blib/lib/CGI/Application/Plugin/DBH.pm
Criterion Covered Total %
branch 30 34 88.2


line true false branch
25 8 21 unless ($$self{'__DBH_CONFIG'}{$name})
27 4 4 unless $$self{'__DBH_CONFIG'}{$name}
30 7 18 unless (defined $$self{'__DBH'}{$name} and $$self{'__DBH'}{$name}->ping)
32 7 0 if (my $config = $$self{'__DBH_CONFIG'}{$name}) { }
34 0 7 if (ref $config and ref $config eq 'CODE') { }
54 5 5 if ref $_[1]
57 0 10 if defined $$self{'__DBH'}{$name}
61 3 7 if (ref $_[0] eq 'ARRAY' or ref $_[0] eq 'CODE') { }
3 4 elsif (ref $_[0] and $_[0]->isa('DBI::db')) { }
83 3 5 unless $params
86 2 3 if (UNIVERSAL::isa($params, 'ARRAY'))
88 1 1 unless $name eq dbh_default_name($app)
94 3 0 if (UNIVERSAL::isa($params, 'HASH'))
96 1 2 unless $params
110 2 2 unless $name eq dbh_default_name($app)
111 1 1 unless $ENV{'DBI_DSN'}
119 4 9 if $_[0]