Branch Coverage

blib/lib/Module/Pluggable/Object.pm
Criterion Covered Total %
branch 101 130 77.6


line true false branch
17 0 40 if ($@) { }
48 3 70 if $self->{'inner'}
58 21 125 if exists $self->{$_} and not ref $self->{$_}
77 0 73 if $File::Find::VERSION >= "1.39" and $^O eq "MSWin32" and not exists $self->{'follow_symlinks'}
78 51 22 unless exists $self->{'follow_symlinks'}
81 0 73 exists $INC{'blib.pm'} && defined $filename && $filename =~ m[(^|/)blib/] && !$self->{'force_search_all_paths'} ? :
84 4 69 if defined $self->{'search_dirs'}
88 69 4 unless $self->{'search_dirs'}
89 4 69 if defined $self->{'search_dirs'}
96 3 70 unless @plugins
102 0 263 unless $self->_is_legit($_)
107 3 67 if (defined $self->{'instantiate'}) { }
111 14 2 unless $package->can($method)
112 0 2 unless $self->{'before_instantiate'}->($package)
115 0 2 if $@
116 2 0 if ($obj)
117 0 2 unless $obj = $self->{'after_instantiate'}->($package, $obj)
138 13 60 if (defined $self->{'only'})
139 4 9 if (ref $self->{'only'} eq 'ARRAY') { }
5 4 elsif (ref $self->{'only'} eq 'Regexp') { }
4 0 elsif (ref $self->{'only'} eq '') { }
149 12 61 if (defined $self->{'except'})
150 4 8 if (ref $self->{'except'} eq 'ARRAY') { }
4 4 elsif (ref $self->{'except'} eq 'Regexp') { }
4 0 elsif (ref $self->{'except'} eq '') { }
168 0 573 unless $self->{'_exceptions'}{'only_hash'}
169 0 573 unless $self->{'_exceptions'}{'except_hash'}
174 16 557 if keys %only and not $only{$plugin}
175 9 548 unless not defined $only or $plugin =~ /$only/
177 8 32 if keys %except and $except{$plugin}
178 4 536 if defined $except and $plugin =~ /$except/
180 1 535 if defined $self->{'max_depth'} and $depth > $self->{'max_depth'}
181 3 532 if defined $self->{'min_depth'} and $depth < $self->{'min_depth'}
183 1 531 if $plugin =~ /(^|::).AppleDouble/
215 505 80 unless -e $sp and -d _
222 0 188 unless ($file) = $file =~ /(.*$file_regex)$/
226 1 187 if not $self->{'include_editor_junk'} and $self->_is_editor_junk($name)
234 2 185 if ($name eq lc $name or $name eq uc $name)
236 0 2 unless open PKGFILE, "<$pkg_file"
239 0 2 if $line =~ /^=\w/
240 0 2 if $line =~ /^=cut/
241 0 2 if $in_pod or $line =~ /^=cut/
242 0 2 if $line =~ /^\s*#/
243 2 0 if ($line =~ /^\s*package\s+(.*::)?($name)\s*;/i)
244 2 0 if defined $1
253 0 187 if $^O =~ /MSWin32|dos/
255 187 0 if ($directory) { }
257 47 140 unless $directory eq "."
261 47 0 unless defined $pkg_dir
269 0 187 unless $plugin =~ /(?:[a-z\d]+)[a-z\d]*/i
289 0 185 if $name =~ /~$/
292 1 184 if $name =~ /^\.#/
294 0 184 if $name =~ /^[._].*\.s[a-w][a-z]$/
305 42 268 unless $self->_is_legit($plugin)
306 125 91 unless (defined $self->{'instantiate'} or $self->{'require'})
311 11 132 if defined $self->{'before_require'}
312 32 110 unless ($no_req)
317 1 31 if ($err)
318 1 0 if (defined $self->{'on_require_error'}) { }
319 1 0 unless $self->{'on_require_error'}->($plugin, $err)
325 9 132 if defined $self->{'after_require'}
345 134 191 unless $File::Find::name =~ /$file_regex/
363 584 1 unless builtin::blessed($dir) and $dir->can("files")
368 0 1 unless $plugin =~ /^$path::/
377 3 151 if exists $self->{'inner'} and not $self->{'inner'}