Branch Coverage

blib/lib/Test/Stream/Plugin/Mock.pm
Criterion Covered Total %
branch 47 54 87.0


line true false branch
32 4 3 unless @BUILD
47 9 15 unless @$set
61 6 40 unless @$args
65 16 24 if ref $proto and not &blessed($proto)
67 2 22 if (&blessed($proto))
68 1 1 unless $proto->isa('Test::Stream::Mock')
69 1 0 if $arg1 and ref $arg1 and &reftype($arg1) eq 'CODE'
72 16 6 if $proto =~ /(?:::|')/
73 3 3 if $proto =~ /^_*[A-Z]/
75 1 2 if 'Test::Stream::Mock'->can($proto)
77 1 1 if (my $sub = 'Test::Stream::Plugin::Mock'->can("mock_$proto"))
86 1 46 if @_ and not defined $_[0]
91 1 45 unless $sub
100 0 6 unless $control and &blessed($control) and $control->isa('Test::Stream::Mock')
103 0 4 unless $sub and ref $sub and &reftype($sub) eq 'CODE'
109 0 4 unless $ok
115 2 5 unless @BUILD
120 2 3 if $meth =~ /^_/ or not $build->can($meth)
129 19 7 if ($proto and ref $proto and &reftype($proto) ne 'CODE') { }
139 1 25 if (@_ == 1 and &reftype($_[0]) eq 'CODE') { }
183 0 26 if $INC{$file}
185 0 26 if keys %$stash
202 0 29 unless has_workflow_vars() or $build or $meta or not $void
209 1 58 if (@args == 1 and ref $args[0] and &reftype($args[0]) eq 'CODE') { }
217 3 56 if ($parent)
229 49 9 unless $void
235 8 1 if has_workflow_vars()