Branch Coverage

blib/lib/Catmandu/Env.pm
Criterion Covered Total %
branch 26 38 68.4


line true false branch
22 0 0 unless opendir my $dh, $path
24 0 0 if grep {-r "File::Spec"->catfile($path, $_);} grep(/^catmandu.+(?:yaml|yml|json|pl)$/, readdir $dh)
73 0 65 unless (-d $dir)
79 65 0 if (-d $lib_dir and -r $lib_dir)
84 65 0 if (@config_dirs)
94 13 52 if ($self->log->is_debug)
101 65 0 if (@lib_dirs)
122 0 11 if (is_instance($_[0], "Catmandu::Fix"))
127 2 9 if (is_array_ref($_[0]))
132 0 9 if (is_able($_[0], "fix"))
141 9 0 unless ($fixers->{$key})
142 3 6 if (my $fixes = $self->config->{'fixer'}{$key})
189 1 126 if is_instance($name) and index(ref $name, $ns) == 0
192 12 19 if ($cache and not @_ and my $instance = $cache->{$key})
196 114 0 if (exists $self->config->{$type})
197 25 89 if (my $c = $self->config->{$type}{$key})
201 1 24 if (@_ > 1) { }
6 18 elsif (@_ == 1) { }
210 10 15 if ($cache and not @_)