| line |
true |
false |
branch |
|
18
|
3 |
2 |
if ($arg eq 'strict') { } |
|
|
2 |
0 |
elsif ($arg eq 'nostrict') { } |
|
33
|
13 |
38 |
if ($hints and grep {m[^Test::MockModule/];} keys %{$hints;}) |
|
43
|
1 |
21 |
if ($package and my $existing = $mocked{$package}) |
|
47
|
1 |
19 |
if $package and $class 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";}) |
|
86
|
6 |
4 |
if "CODE" eq ref $coderef |
|
88
|
4 |
0 |
if ($sub_name =~ qr/^(.+)::([^:]+)$/) |
|
90
|
1 |
3 |
if $pkg->can($sub) |
|
93
|
3 |
0 |
if ("CODE" ne ref $coderef) |
|
109
|
1 |
4 |
if ("CODE" eq ref $coderef) |
|
120
|
3 |
18 |
if $self->_strict_mode |
|
130
|
13 |
21 |
if (ref $value and builtin::reftype($value) eq 'CODE') { } |
|
|
19 |
2 |
elsif (defined $value) { } |
|
137
|
1 |
33 |
unless _valid_subname($name) |
|
139
|
26 |
7 |
unless ($self->{'_mocked'}{$name}) |
|
142
|
15 |
11 |
if (defined &{$sub_name;}) { } |
|
158
|
1 |
2 |
if $self->_strict_mode |
|
168
|
0 |
7 |
unless _valid_subname($name) |
|
171
|
1 |
6 |
unless $self->{'_mocked'}{$name} |
|
172
|
3 |
3 |
defined $self->{'_orig'}{$name} ? : |
|
177
|
1 |
29 |
unless @names |
|
179
|
1 |
28 |
unless _valid_subname($name) |
|
182
|
2 |
26 |
unless ($self->{'_mocked'}{$name}) |
|
207
|
0 |
5 |
unless _valid_subname($name) |
|
219
|
1 |
19 |
unless defined $name and length $name |
|
225
|
0 |
75 |
unless defined $name and length $name |
|
234
|
48 |
11 |
if (defined $coderef) { } |
|
244
|
0 |
55 |
unless defined $symbols{$sub} |
|
245
|
43 |
12 |
unless defined(my $elem = *{$symbols{$sub};}{$slot_name}) |
|
253
|
0 |
11 |
unless scalar keys %slot |