Branch Coverage

blib/lib/Class/Sniff.pm
Criterion Covered Total %
branch 87 120 72.5


line true false branch
125 0 15 unless my $proto = $$arg_for{'class'}
128 0 15 if (exists $$arg_for{'ignore'} and 'Regexp' ne ref $$arg_for{'ignore'})
223 0 4 unless my $namespace = delete $$arg_for{'namespace'}
227 3 1 'Regexp' eq ref $namespace ? :
231 0 4 if (defined $ignore)
232 0 0 'Regexp' eq ref $ignore ? :
242 0 1057 if $seen{$symbol_name}++
243 11 1046 if ($symbol_name =~ /$namespace/)
244 0 11 if defined $ignore and $symbol_name =~ /$ignore/
247 4 7 unless ($class->_is_real_package($symbol_name))
279 1 0 @sniffs ? :
310 44 52 if exists $$self{'classes'}{$class}
317 0 121 unless my $coderef = $class->can($method)
320 2 119 if ($package ne $class) { }
331 1 101 if ($length > $self->method_length)
389 9 16 if @$classes > 1
450 0 3 if @paths == 1
466 5 16 if ($method_found)
471 11 26 if $curr_class eq $class
472 13 13 unless ($method_found and $curr_class->can($method))
536 41 36 unless @_
604 2 2 if (@$methods > 1)
696 1 17 unless (exists $$self{'classes'}{$class})
752 1 0 if ($report)
770 0 6 unless $$a[0] cmp $$b[0]
773 1 0 if (@duplicate)
774 0 1 unless $$a[0][0] cmp $$b[0][0]
791 1 0 if (%$overridden)
807 1 0 if (my(@unreachable) = $self->unreachable)
823 1 0 if (my(@multis) = $self->multiple_inheritance)
835 1 0 if (my(@classes) = sort(keys %$exported))
843 1 0 if length $class > $longest_c
844 0 1 if length $sub > $longest_m
851 0 1 if $longest_c > $third
852 0 1 if $longest_m > $third
871 1 0 if (my(@methods) = sort(keys %long_methods))
885 0 5 unless (@$strings1 == @$strings2)
904 3 5 if $length > $longest
906 0 5 if $longest > $width / 2
920 6 15 unless @_
922 0 15 unless ($number =~ /^\d+$/ and $number >= 40)
983 0 5 unless ($sniff->isa(ref $self))
1081 1 3 unless (exists $$self{'classes'}{$class})
1105 4 3 unless (exists $$self{'classes'}{$class})
1113 10 158 if $class eq 'UNIVERSAL' or not $self->_is_real_package($class)
1117 20 138 if ($self->universal and not @parents)
1120 7 151 if (my $ignore = $self->ignore)
1130 0 174 if 'UNIVERSAL' eq $class
1132 9 165 unless eval { do { my $stash = \%{"${class}::";}; scalar grep({defined *{$_;}{'CODE'};} sort(values %$stash)) unless defined $$stash{'ISA'} and defined *{$$stash{'ISA'};}{'ARRAY'} } }
1135 13 161 unless defined $$stash{'ISA'} and defined *{$$stash{'ISA'};}{'ARRAY'}
1143 4 56 if (my $ignore = $self->ignore)
1144 0 4 if $class =~ /$ignore/
1146 8 52 if ($self->clean)
1147 0 8 if $class =~ /::(?:SUPER|ISA::CACHE)$/
1149 24 36 unless my(@parents) = $self->_get_parents($class)
1172 36 18 if ($$path[-1] eq $class) { }
1174 0 45 if (grep {$parent eq $_;} @$path)
1187 36 0 if $do_chg
1197 37 8 unless grep {$_ eq $parent;} @{$$self{'list_classes'};}
1220 43 2 unless (grep {$child eq $_;} @$children)