Branch Coverage

blib/lib/Class/DBI/ViewLoader.pm
Criterion Covered Total %
branch 91 92 98.9


line true false branch
142 11 12 if ($args{'dsn'})
149 34 1 if (my $setter = $self->can("set_$arg"))
154 1 19 if (%args)
167 6 38 if (defined $compat{$arg})
171 2 4 unless $arg = $compat{$arg}
197 1 17 unless $dsn
199 1 16 unless my $driver = ('DBI'->parse_dsn($dsn))[1]
213 19 1 if ($handler) { }
214 18 1 if ($handler->isa('Class::DBI::ViewLoader')) { }
251 5 1 if defined $user
280 5 1 if defined $pass
315 2 2 ref $_[0] ? :
338 1 3 unless $self->{'_dbi_options'}
356 1 2 if $self->{'_dbh'}
358 1 1 unless my $dbh = 'DBI'->connect($self->_get_dbi_args)
381 4 24 if $self->_keepalive
383 1 23 if (defined $self->{'_dbh'})
440 26 4 if (defined $out and length $out) { }
518 10 4 if (defined $regex)
519 4 6 if (ref $regex) { }
520 1 3 if ref $regex ne 'Regexp'
538 2 12 if $include
539 1 13 if $exclude
562 1 6 ref $_[0] ? :
592 18 12 unless $_[0]{'_base_classes'}
606 2 7 ref $_[0] ? :
624 21 13 unless $self->{'_left_base_classes'}
671 2 5 ref $_[0] ? :
700 16 13 unless $_[0]{'_import_classes'}
798 25 1 if (@cols) { }
819 2 23 if $class_cache{$class}++
833 1 2 @undef == @cols ? :
840 12 11 unless ($class->can('db_Main'))
867 11 1 if (ref $v eq 'version')
868 9 2 if ($v >= 'version'->new(3.0.7))
881 2 21 if (defined(my $accessor = $self->get_accessor_prefix))
890 2 21 if (defined(my $mutator = $self->get_mutator_prefix))
908 15 8 unless my(@imports) = $self->get_import_classes
914 0 12 if ref $module
916 4 8 if ($module->isa('Exporter')) { }
6 2 elsif ($module->can('import')) { }
928 6 2 if (@manual)
954 3 11 if (defined $cache)
959 1 2 if $@
981 26 2 if (defined $view and length $view) { }
1108 3 3 if ($handler eq 'Class::DBI::ViewLoader') { }