Branch Coverage

blib/lib/Mojolicious/Plugin/Model.pm
Criterion Covered Total %
branch 15 26 57.6


line true false branch
15 0 4 -d $path ? :
23 5 4 if $model = $plugin->{'models'}{$name}
25 0 4 unless my $class = _load_class_for_name($plugin, $app, $conf, $name, $moniker)
29 1 3 ref $params eq 'HASH' ? :
40 0 2 unless my $class = _load_class_for_name($plugin, $app, $conf, $name, $moniker)
44 0 2 ref $params eq 'HASH' ? :
53 0 6 'Mojo::Loader'->can('new') ? :
55 6 0 unless $error
56 0 0 if ref $error
62 0 6 if $plugin->{'classes_loaded'}{$name}
67 4 2 if $name =~ /^[a-z]/u
70 0 6 unless _load_class($class)
72 0 6 unless (&any(sub { $class->isa($_); } , @$base))