line |
true |
false |
branch |
17
|
3 |
2 |
if ($arg eq 'strict') { } |
|
2 |
0 |
elsif ($arg eq 'nostrict') { } |
32
|
13 |
38 |
if ($hints and grep {m[^Test::MockModule/];} keys %{$hints;}) |
43
|
1 |
21 |
if ($package and my $existing = $mocked{$package}) |
47
|
1 |
20 |
if $package and $package eq $class |
48
|
2 |
18 |
unless (_valid_package($package)) |
49
|
1 |
1 |
unless defined $package |
53
|
6 |
10 |
unless ($package eq 'CORE::GLOBAL' or $package eq 'main' or $args{'no_auto'} or ${"${package}::VERSION";}) |
85
|
6 |
4 |
if 'CODE' eq ref $coderef |
87
|
4 |
0 |
if ($sub_name =~ qr/^(.+)::([^:]+)$/) |
89
|
1 |
3 |
if $pkg->can($sub) |
92
|
3 |
0 |
if ('CODE' ne ref $coderef) |
107
|
1 |
4 |
if ('CODE' eq ref $coderef) |
118
|
3 |
18 |
if $self->_strict_mode |
128
|
13 |
21 |
if (ref $value and &reftype($value) eq 'CODE') { } |
|
19 |
2 |
elsif (defined $value) { } |
135
|
1 |
33 |
unless _valid_subname($name) |
137
|
26 |
7 |
unless ($self->{'_mocked'}{$name}) |
140
|
15 |
11 |
if (defined &{$sub_name;}) { } |
156
|
1 |
2 |
if $self->_strict_mode |
167
|
1 |
6 |
unless $self->{'_mocked'}{$name} |
168
|
3 |
3 |
defined $self->{'_orig'}{$name} ? : |
173
|
1 |
29 |
unless @_ |
175
|
1 |
28 |
unless _valid_subname($name) |
178
|
2 |
26 |
unless ($self->{'_mocked'}{$name}) |
212
|
19 |
1 |
if defined $_[0] |
225
|
48 |
11 |
if (defined $coderef) { } |
235
|
43 |
12 |
unless defined(my $elem = *{$symbols{$sub};}{$_}) |
243
|
0 |
11 |
unless keys %slot |