Branch Coverage

blib/lib/Test/MockModule.pm
Criterion Covered Total %
branch 50 54 92.5


line true false branch
16 1 0 if ($arg eq 'strict') { }
30 1 19 if ($package and my $existing = $mocked{$package})
34 1 18 if $package and $package eq $class
35 2 16 unless (_valid_package($package))
36 1 1 unless defined $package
40 4 10 unless ($package eq 'CORE::GLOBAL' or $package eq 'main' or $args{'no_auto'} or ${"${package}::VERSION";})
72 5 4 if 'CODE' eq ref $coderef
74 4 0 if ($sub_name =~ qr/^(.+)::([^:]+)$/)
76 1 3 if $pkg->can($sub)
79 3 0 if ('CODE' ne ref $coderef)
94 1 4 if ('CODE' eq ref $coderef)
105 1 15 if $STRICT_MODE
115 11 19 if (ref $value and &reftype($value) eq 'CODE') { }
17 2 elsif (defined $value) { }
122 1 29 unless _valid_subname($name)
124 24 5 unless ($self->{'_mocked'}{$name})
127 13 11 if (defined &{$sub_name;}) { }
143 1 2 if $STRICT_MODE
154 1 6 unless $self->{'_mocked'}{$name}
155 3 3 defined $self->{'_orig'}{$name} ? :
160 1 27 unless @_
162 1 26 unless _valid_subname($name)
165 2 24 unless ($self->{'_mocked'}{$name})
199 17 1 if defined $_[0]
212 42 11 if (defined $coderef) { }
222 43 12 unless defined(my $elem = *{$symbols{$sub};}{$_})
230 0 11 unless keys %slot