Branch Coverage

blib/lib/Class/Autouse.pm
Criterion Covered Total %
branch 3 174 1.7


line true false branch
22 14 0 unless defined &DB::DB
23 12 2 unless defined $DEBUG
115 0 0 if $Class::Autouse::DEVEL++
133 0 0 if $Class::Autouse::SUPERLOAD++
143 0 0 if $_[0] eq 'Class::Autouse'
146 0 0 unless @_
152 0 0 unless (ref $callback eq 'CODE')
172 0 0 if $_[0] eq 'Class::Autouse'
175 0 0 unless @_
180 0 0 if (ref $class)
181 0 0 unless (ref $class eq 'Regexp' or ref $class eq 'CODE')
200 0 0 if (substr($class, 0, 1) eq ':')
201 0 0 if ($class eq ':superloader') { }
0 0 elsif ($class eq ':devel') { }
0 0 elsif ($class eq ':nostat') { }
0 0 elsif ($class eq ':noprebless') { }
0 0 elsif ($class eq ':staticisa') { }
222 0 0 if ($Class::Autouse::DEVEL or $Class::Autouse::BAD{$class})
229 0 0 if exists $INC{$file}
230 0 0 unless ($Class::Autouse::NOSTAT or &_file_exists($file))
237 0 0 if $Class::Autouse::SUPERLOAD
244 0 0 unless $Class::Autouse::HOOKS++
266 0 0 unless my $class = $_[1]
267 0 0 if $Class::Autouse::LOADED{$class}
273 0 0 wantarray ? :
280 0 0 unless _namespace_occupied($_[1])
290 0 0 unless _namespace_occupied($_[1])
301 0 0 if $Class::Autouse::DEVEL
304 0 0 if $Class::Autouse::SUPERLOAD
337 0 0 unless my $method = $Class::Autouse::AUTOLOAD
338 0 0 if ++$Class::Autouse::TRIED_METHOD{$method} > 10
342 0 0 if $Class::Autouse::SPECIAL{$class}
351 0 0 if $found
355 0 0 if (defined *{"${c}::AUTOLOAD";}{'CODE'})
372 0 0 unless my $method = $Class::Autouse::AUTOLOAD
373 0 0 if ++$Class::Autouse::TRIED_METHOD{$method} > 10
377 0 0 if $Class::Autouse::SPECIAL{$class}
380 0 0 if ($Class::Autouse::SUPERLOAD)
388 0 0 unless (@search)
391 0 0 if (_try_loaders($class, $function, @_))
393 0 0 if ($fref) { }
403 0 0 if $found
407 0 0 if (defined *{"${c}::AUTOLOAD";}{'CODE'})
416 0 0 if $rv
431 0 0 if ref $_[0] and $Class::Autouse::NOPREBLESS
435 0 0 unless ($Class::Autouse::TRIED_CLASS{$class} or $Class::Autouse::LOADED{$class})
445 0 0 if ref $_[0] and $Class::Autouse::NOPREBLESS
449 0 0 unless ($Class::Autouse::TRIED_CLASS{$class} or $Class::Autouse::LOADED{$class})
468 0 0 unless ($class and $class =~ /^[^\W\d]\w*(?:(?:\'|::)[^\W]\w*)*$/o)
475 0 0 if (defined $INC{$file} and $INC{$file} eq 'Class::Autouse') { }
0 0 elsif (not $Class::Autouse::SUPERLOAD) { }
0 0 elsif (_namespace_occupied($class)) { }
493 0 0 if $load
495 0 0 unless ($Class::Autouse::LOADED{$class})
497 0 0 unless ($Class::Autouse::LOADED{$class})
498 0 0 if (_namespace_occupied($class))
519 0 0 if (_namespace_occupied($class))
528 0 0 if ($ref) { }
529 0 0 if ($ref eq 'Regexp') { }
0 0 elsif ($ref eq 'CODE') { }
530 0 0 unless $class =~ /$loader/
532 0 0 unless grep {-e $_ . '/' . $file;} @INC
536 0 0 if $@
539 0 0 unless (&$loader($class, $function, @optional_args))
567 0 0 if ($Class::Autouse::STATICISA)
591 0 0 if $seen{$c}++
595 0 0 if ($load and not $Class::Autouse::LOADED{$c})
613 0 0 unless my $class = shift()
616 0 0 if $Class::Autouse::SPECIAL{$class}
620 0 0 if (defined $INC{$file}) { }
0 0 elsif (not &_file_exists($file)) { }
623 0 0 if ($INC{$file} ne 'Class::Autouse')
636 0 0 if (_namespace_occupied($class))
642 0 0 if (_try_loaders($class))
656 0 0 if $@
659 0 0 unless --$Class::Autouse::HOOKS
675 0 0 unless my $inc_path = &List::Util::first(sub { -f 'File::Spec'->catfile($_, $base_file); } , @INC)
681 0 0 unless -d $child_path_full and -r _
692 0 0 unless opendir FILELIST, $full_dir
703 0 0 if (-d $full_file and -r _)
709 0 0 unless substr($file, length($file) - 3) eq '.pm'
710 0 0 unless -f _
734 0 0 unless my $file = shift()
735 0 0 if $file =~ /(?:\012|\015)/o
738 0 0 if $file =~ /::/o
742 0 0 if ref $_ eq 'CODE'
743 0 0 if -f 'File::Spec'->catfile($_, $file)