Branch Coverage

blib/lib/Class/Autouse.pm
Criterion Covered Total %
branch 79 130 60.8


line true false branch
85 0 2 if $DEVEL
103 0 0 unless ($SUPERLOAD)
114 0 0 unless $HOOKS++
123 15 0 if $_[0] eq 'Class::Autouse'
126 2 13 unless @_
132 1 16 if (substr($class, 0, 1) eq ':')
133 0 1 if ($class eq ':superloader') { }
1 0 elsif ($class eq ':devel') { }
0 0 elsif ($class eq ':nostat') { }
147 0 16 if ($DEVEL or $BAD{$class})
154 0 16 if exists $INC{$file}
155 0 16 unless ($NOSTAT or &_file_exists($file))
162 0 16 if $SUPERLOAD
169 9 7 unless $HOOKS++
189 0 15 unless my $class = $_[1]
190 0 15 if $LOADED{$class}
197 0 22 if $seen{$c}++
200 21 1 unless $LOADED{$c}
210 8 6 wantarray ? :
217 1 1 unless _namespace_occupied($_[1])
227 0 0 unless _namespace_occupied($_[1])
238 1 1 if $DEVEL
241 0 1 if $SUPERLOAD
274 0 8 unless my $method = $AUTOLOAD
275 0 8 if ++$chased{$method} > 10
279 0 8 if $SPECIAL{$class}
286 8 0 if $found
290 0 0 if (defined *{"${c}::AUTOLOAD";}{'CODE'})
311 24 6 if ($LOADED{$class} or defined @{"${class}::ISA";})
323 6529 4 if ($LOADED{$class} or defined @{"${class}::ISA";})
335 1 9 unless $class =~ /^[^\W\d]\w*(?:(?:'|::)[^\W\d]\w*)*$/o
340 4 5 if (defined $INC{$file} and $INC{$file} eq 'Class::Autouse') { }
5 0 elsif (not $SUPERLOAD) { }
0 0 elsif (&_namespace_occupied($class)) { }
358 4 5 if ($load)
360 1 3 if $@
379 0 21 unless my $class = shift @_
380 0 21 if $SPECIAL{$class}
384 20 1 if (defined $INC{$file}) { }
0 1 elsif (not &_file_exists($file)) { }
387 4 16 if $INC{$file} ne 'Class::Autouse'
398 0 0 if &_namespace_occupied($class)
408 1 16 if $@
411 8 8 unless --$HOOKS
425 0 2 unless my $inc_path = &List::Util::first(sub {
431 0 2 unless -d $child_path_full and -r _
442 0 3 unless opendir FILELIST, $full_dir
453 1 4 if (-d $full_file and -r _)
459 0 4 unless substr($file, length($file) - 3) eq '.pm'
460 0 4 unless -f _
484 0 18 unless my $file = shift @_
485 0 18 if $file =~ /(?:\012|\015)/o
488 1 17 if $file =~ /::/o
492 17 10 if -f 'File::Spec'->catfile($_, $file)
503 0 2 unless my $class = shift @_
504 1 1 if defined @{"${class}::ISA";}
508 0 0 if substr($_, -2) eq '::'
511 0 0 if defined *{"${class}::$_";}{'CODE'}
532 1 3 unless (defined $subclass and $subclass eq 'Class::Autouse')
535 0 1 $spaces ? :
583 9 8 $HOOKS ? :
584 9 8 $HOOKS ? :
590 0 7 if ($@) { }
593 0 0 if $ENV{'MOD_PERL'}
598 0 7 if $@