Branch Coverage

blib/lib/Mojolicious/Plugin/Model.pm
Criterion Covered Total %
branch 14 24 58.3


line true false branch
19 5 4 if $model = $plugin->{'models'}{$name}
21 0 4 unless my $class = _load_class_for_name($plugin, $app, $conf, $name)
25 1 3 ref $params eq 'HASH' ? :
36 0 2 unless my $class = _load_class_for_name($plugin, $app, $conf, $name)
40 0 2 ref $params eq 'HASH' ? :
49 0 6 'Mojo::Loader'->can('new') ? :
51 6 0 unless $error
52 0 0 if ref $error
58 0 6 if $plugin->{'classes_loaded'}{$name}
63 4 2 if $name =~ /^[a-z]/
66 0 6 unless _load_class($class)
68 0 6 unless (&any(sub { $class->isa($_); } , @$base))