Branch Coverage

blib/lib/Test/MonkeyMock.pm
Criterion Covered Total %
branch 53 64 82.8


line true false branch
15 0 33 if ref $class
20 19 14 if ($instance) { }
62 17 17 if (ref($self) =~ /__instance__/) { }
63 1 16 unless my $orig_method = $self->can($method)
66 1 15 if (exists $$registry{ref $self}{'mocks'}{$method})
112 3 3 if (ref($self) =~ /__instance__/) { }
113 1 2 unless $self->can($method)
118 1 2 unless exists $mocks->{$method}
132 2 6 unless @$stack > $frame
142 0 11 unless $method
147 6 5 if (ref($self) =~ /__instance__/) { }
148 1 5 unless $self->can($method)
153 1 4 unless exists $mocks->{$method}
157 0 9 unless exists $calls->{$method}
170 0 6 unless @$stack > $frame
180 0 7 unless $method
185 4 3 if (ref($self) =~ /__instance__/) { }
186 0 4 unless $self->can($method)
191 0 3 unless exists $mocks->{$method}
195 0 7 unless exists $returns->{$method}
204 0 5 if (ref($self) =~ /__instance__/) { }
220 14 19 if $method =~ /^[A-Z]+$/
234 1 44 unless exists $mocks->{$method}
237 50 1 if (my $options = $mock->{'options'})
238 4 46 if (my $when = $options->{'when'})
239 2 2 unless &$when(@_)
242 7 41 if (defined(my $frame = $options->{'frame'}))
245 6 1 $returns->{$method}{'stack'} ? :
247 5 2 unless $frame == $current_frame
257 41 3 if (my $code = $mock->{'code'}) { }
3 0 elsif (my $orig_code = $mock->{'orig_code'}) { }
269 0 44 wantarray ? :