Branch Coverage

blib/lib/Module/Pluggable/Object.pm
Criterion Covered Total %
branch 96 122 78.6


line true false branch
17 39 0 if (not $@) { }
48 3 69 if $self->{'inner'}
58 21 123 if exists $self->{$_} and not ref $self->{$_}
69 50 22 unless exists $self->{'follow_symlinks'}
72 0 72 exists $INC{'blib.pm'} && defined $filename && $filename =~ m[(^|/)blib/] && !$self->{'force_search_all_paths'} ? :
75 4 68 if defined $self->{'search_dirs'}
79 68 4 unless $self->{'search_dirs'}
80 4 68 if defined $self->{'search_dirs'}
87 3 69 unless @plugins
93 0 212 unless $self->_is_legit($_)
98 3 66 if (defined $self->{'instantiate'}) { }
102 7 2 unless $package->can($method)
104 0 2 if $@
105 2 0 if $obj
123 13 59 if (defined $self->{'only'})
124 4 9 if (ref $self->{'only'} eq 'ARRAY') { }
5 4 elsif (ref $self->{'only'} eq 'Regexp') { }
4 0 elsif (ref $self->{'only'} eq '') { }
134 12 60 if (defined $self->{'except'})
135 4 8 if (ref $self->{'except'} eq 'ARRAY') { }
4 4 elsif (ref $self->{'except'} eq 'Regexp') { }
4 0 elsif (ref $self->{'except'} eq '') { }
153 0 470 unless $self->{'_exceptions'}{'only_hash'}
154 0 470 unless $self->{'_exceptions'}{'except_hash'}
159 16 454 if keys %only and not $only{$plugin}
160 9 445 unless not defined $only or $plugin =~ /$only/
162 8 32 if keys %except and $except{$plugin}
163 4 433 if defined $except and $plugin =~ /$except/
165 1 432 if defined $self->{'max_depth'} and $depth > $self->{'max_depth'}
166 3 429 if defined $self->{'min_depth'} and $depth < $self->{'min_depth'}
198 653 77 unless -e $sp and -d _
205 0 180 unless ($file) = $file =~ /(.*$file_regex)$/
209 1 179 if not $self->{'include_editor_junk'} and $self->_is_editor_junk($name)
217 2 177 if ($name eq lc $name or $name eq uc $name)
219 0 2 unless open PKGFILE, "<$pkg_file"
222 0 2 if $line =~ /^=\w/
223 0 2 if $line =~ /^=cut/
224 0 2 if $in_pod or $line =~ /^=cut/
225 0 2 if $line =~ /^\s*#/
226 2 0 if ($line =~ /^\s*package\s+(.*::)?($name)\s*;/i)
227 2 0 if defined $1
236 0 179 if $^O =~ /MSWin32|dos/
238 179 0 if ($directory) { }
240 42 137 unless $directory eq '.'
244 42 0 unless defined $pkg_dir
252 0 179 unless $plugin =~ /(?:[a-z\d]+)[a-z\d]*/i
272 0 177 if $name =~ /~$/
275 1 176 if $name =~ /^\.#/
277 0 176 if $name =~ /\.sw[po]$/
288 41 217 unless $self->_is_legit($plugin)
289 124 66 unless (defined $self->{'instantiate'} or $self->{'require'})
294 11 82 if defined $self->{'before_require'}
295 26 66 unless ($no_req)
300 1 25 if ($err)
301 1 0 if (defined $self->{'on_require_error'}) { }
302 1 0 unless $self->{'on_require_error'}->($plugin, $err)
308 9 82 if defined $self->{'after_require'}
328 128 183 unless $File::Find::name =~ /$file_regex/
346 729 1 unless ref $dir and eval { do { $dir->can('files') } }
351 0 1 unless $plugin =~ /^$path::/
360 3 147 if exists $self->{'inner'} and not $self->{'inner'}