Branch Coverage

blib/lib/Class/DBI/ViewLoader.pm
Criterion Covered Total %
branch 78 90 86.6


line true false branch
144 8 10 if ($args{'dsn'})
151 16 1 if (my $setter = $self->can("set_$arg"))
156 1 14 if (%args)
169 0 24 if (defined $compat{$arg})
173 0 0 unless $arg = $compat{$arg}
199 1 13 unless $dsn
201 1 12 unless my $driver = ('DBI'->parse_dsn($dsn))[1]
215 15 1 if ($handler) { }
216 14 1 if (isa($handler, 'Class::DBI::ViewLoader')) { }
253 2 1 if defined $user
282 2 1 if defined $pass
317 0 0 ref $_[0] ? :
340 0 0 unless $$self{'_dbi_options'}
358 1 2 if $$self{'_dbh'}
360 1 1 unless my $dbh = 'DBI'->connect($self->_get_dbi_args)
383 4 19 if $self->_keepalive
385 1 18 if (defined $$self{'_dbh'})
442 24 2 if (defined $out and length $out) { }
520 4 2 if (defined $regex)
521 4 0 if (ref $regex) { }
522 1 3 if ref $regex ne 'Regexp'
540 2 12 if $include
541 1 13 if $exclude
564 0 2 ref $_[0] ? :
594 17 6 unless $_[0]{'_base_classes'}
608 0 4 ref $_[0] ? :
626 20 7 unless $$self{'_left_base_classes'}
673 1 2 ref $_[0] ? :
702 15 8 unless $_[0]{'_import_classes'}
800 25 1 if (@cols) { }
821 2 23 if $class_cache{$class}++
835 1 2 @undef == @cols ? :
842 12 11 unless ($class->can('db_Main'))
869 11 1 if (ref $v eq 'version')
870 9 2 if ($v >= 'version'->new(3.0.7))
883 2 21 if (defined(my $accessor = $self->get_accessor_prefix))
892 2 21 if (defined(my $mutator = $self->get_mutator_prefix))
910 15 8 unless my(@imports) = $self->get_import_classes
914 4 8 if (isa($module, 'Exporter')) { }
8 0 elsif (can($module, 'import')) { }
926 8 0 if (@manual)
952 4 10 if (defined $cache)
957 1 3 if $@
979 26 2 if (defined $view and length $view) { }
1106 3 3 if ($handler eq 'Class::DBI::ViewLoader') { }