Branch Coverage

blib/lib/Repl/Core/Eval.pm
Criterion Covered Total %
branch 108 178 60.6


line true false branch
36 0 0 if $arg
57 0 0 if $arg
68 1 25 if $@
77 450 203 if (not ref $expr eq 'ARRAY') { }
82 102 348 if ($expr =~ /\$(.+)/) { }
0 348 elsif (ref $expr and $expr->isa('Repl::Core::Pair')) { }
103 0 203 unless scalar $expr
110 0 203 if ('quote' eq $cmdCandidate) { }
34 169 elsif ('if' eq $cmdCandidate) { }
1 168 elsif ('while' eq $cmdCandidate) { }
5 163 elsif ('and' eq $cmdCandidate) { }
3 160 elsif ('or' eq $cmdCandidate) { }
2 158 elsif ('not' eq $cmdCandidate) { }
25 133 elsif ('set' eq $cmdCandidate or 'defvar' eq $cmdCandidate) { }
7 126 elsif ('let' eq $cmdCandidate or 'let*' eq $cmdCandidate) { }
0 126 elsif ('get' eq $cmdCandidate) { }
4 122 elsif ('lambda' eq $cmdCandidate) { }
1 121 elsif ('defun' eq $cmdCandidate) { }
0 121 elsif ('timer' eq $cmdCandidate) { }
0 121 elsif ($$self{'MACREPO'}->hasMacro($cmdCandidate)) { }
112 0 0 if $listsize == 2
117 0 34 if $listsize < 3 or $listsize > 4
118 26 8 if ($self->boolEval($self->evalInContext($$expr[1], $ctx))) { }
8 0 elsif ($listsize == 4) { }
133 0 1 if $listsize < 2 or $listsize > 3
137 10 0 if ($listsize == 3)
146 0 5 if $listsize < 2
150 2 20 unless $self->boolEval($self->evalInContext($el, $ctx))
156 0 3 if $listsize < 2
160 1 13 if $self->boolEval($self->evalInContext($el, $ctx))
166 0 2 if $listsize != 2
167 1 1 if ($self->evalInContext($$expr[1], $ctx)) { }
181 4 21 if ($listsize == 2) { }
21 0 elsif ($listsize == 3) { }
184 4 0 if (ref $paircand and $paircand->isa('Repl::Core::Pair')) { }
204 0 25 if ref $name
206 14 11 if ('set' eq $cmdCandidate) { }
220 0 7 if $listsize != 3
225 0 7 if 'ARRAY' ne ref $bindings
231 0 16 if (ref $binding eq 'ARRAY') { }
16 0 elsif (ref $binding eq 'Repl::Core::Pair') { }
0 0 elsif (not ref $binding and $binding) { }
233 0 0 if scalar @$binding != 2
236 0 0 if ($isletrec) { }
250 4 12 if ($isletrec) { }
261 0 0 if ($isletrec) { }
276 5 2 unless ($isletrec)
289 0 0 if $listsize != 2
291 0 0 if ref $name
296 0 4 if $listsize != 3
300 0 4 if ref $params ne 'ARRAY'
301 0 4 unless $body
304 0 4 if ref $param or not $param
313 0 1 if $listsize != 4
318 0 1 if not $name or ref $name
319 0 1 if ref $params ne 'ARRAY'
320 0 1 unless $body
323 0 1 if ref $param or not $param
334 0 0 if $listsize != 2
358 0 121 if scalar @$evallist == 0
360 0 121 if ('eval' eq $cmdCandidate) { }
15 106 elsif ('eq' eq $cmdCandidate) { }
6 100 elsif ('progn' eq $cmdCandidate) { }
25 75 elsif ('funcall' eq $cmdCandidate) { }
51 24 elsif ($$self{'CMDREPO'}->hasCommand($cmdCandidate)) { }
21 3 elsif ($ctx->isBound($cmdCandidate) and ref $ctx->getBinding($cmdCandidate) eq 'Repl::Core::Lambda') { }
3 0 elsif (ref $cmdCandidate eq 'Repl::Core::Lambda') { }
362 0 0 if $listsize != 2
367 0 15 if $listsize != 3
374 0 6 if $listsize < 2
379 0 25 if $listsize < 2
383 24 1 if (ref $name eq 'Repl::Core::Lambda') { }
1 0 elsif (not ref $name) { }
390 1 0 if (ref $obj eq 'Repl::Core::Lambda') { }
406 0 25 if $@
410 0 25 if $@
419 0 51 if ($@) { }
450 0 0 if ($cmdCandidate) { }
461 1 652 if ($@) { }
470 0 1 if (length $msg >= $totalMsgLim) { }
472 0 0 unless ($msg =~ /.*-> \.\.\. $/)
496 2 0 if ($msg =~ /\A(.*) at .+ line .*\Z/s)
510 1 2 if (ref $arr eq 'ARRAY')
519 1 1 if $i != $arrsize - 1
534 0 81 unless defined $expr
535 13 68 if $expr =~ /true|ok|on|yes|y|t/i
536 9 59 if $expr =~ /false|nok|off|no|n|f/i
537 44 15 if $expr != 0
538 0 15 if (ref $expr eq 'ARRAY')