Branch Coverage

blib/lib/Positron/Expression.pm
Criterion Covered Total %
branch 110 130 84.6


line true false branch
253 12 518 unless defined $string and $string ne ''
281 0 0 unless ($parser)
286 0 0 unless defined $string and $string ne ''
294 0 0 if ($error_string)
297 0 0 if ($try_string =~ / \S /msx)
307 0 539 unless defined $string
309 0 539 if $string eq ''
311 4 521 if ($string =~ / \G \s* \S/msx)
341 20 534 @others ? :
346 14 601 if ($_[0] =~ /\G \s* (!) \s*/cgmsx) { }
355 86 515 if ($_[0] =~ /\G \s* (["'`])/msx) { }
49 466 elsif ($_[0] =~ /\G \s* [\d+-]/msx) { }
463 3 elsif ($_[0] =~ /\G \s* [([:alpha:]_\$]/msx) { }
365 49 406 @rterms ? :
373 10 464 if ($_[0] =~ / \G \s* \( \s* /cgmsx) { }
7 457 elsif ($_[0] =~ / \G \s* \$ /cgmsx) { }
456 1 elsif ($_[0] =~ /\G \s* [[:alpha:]_] /msx) { }
375 9 1 if ($_[0] =~ / \G \s* \) \s* /cgmsx) { }
386 10 446 if ($_[0] =~ / \G \s* \( \s* /cgmsx) { }
391 4 6 if (@arguments)
394 1 3 unless $_[0] =~ / \s* , [[:space:],]* /cgmsx
400 8 1 if ($_[0] =~ / \G [[:space:],]* \) \s* /cgmsx) { }
416 4 53 if ($_[0] =~ / \G \s* \( \s* /cgmsx) { }
4 49 elsif ($_[0] =~ / \G \s* \$ /cgmsx) { }
0 49 elsif ($_[0] =~ /\G \s* (?=["'`])/cgmsx) { }
6 43 elsif ($_[0] =~ /\G \s* (?=[\d+-])/cgmsx) { }
43 0 elsif ($_[0] =~ /\G \s* [[:alpha:]_] /msx) { }
418 3 1 if ($_[0] =~ / \G \s* \) \s* /cgmsx) { }
435 10 33 if ($_[0] =~ / \G \s* \( \s* /cgmsx) { }
439 2 5 if (@arguments)
442 1 1 unless $_[0] =~ / \s* , [[:space:],]* /cgmsx
448 9 0 if ($_[0] =~ / \G [[:space:],]* \) \s* /cgmsx) { }
467 63 1 if $_[0] =~ / \G \s* " ([^"]*) " \s* /cgmsx
468 1 0 if $_[0] =~ / \G \s* ' ([^']*) ' \s* /cgmsx
469 21 0 if $_[0] =~ / \G \s* ` ([^`]*) ` \s* /cgmsx
472 85 1 if (defined $contents) { }
481 499 0 if ($_[0] =~ / \G ( [[:alpha:]_] [[:alnum:]_]*) \s* /cgmsx) { }
492 47 2 if ($_[0] =~ / \G \s* ([+-]? \d+ (?:\.\d+)? ) \s* /cgmsx) { }
501 4 2 if ($_[0] =~ / \G \s* ([+-]? \d+ ) \s* /cgmsx) { }
554 11 71 if (ref $it) { }
555 7 4 if (ref $it eq 'ARRAY') { }
4 0 elsif (ref $it eq 'HASH') { }
570 578 522 if (not ref $tree) { }
574 433 89 if ($operand eq 'env') { }
8 81 elsif ($operand eq 'funccall') { }
5 76 elsif ($operand eq 'methcall') { }
12 64 elsif ($operand eq 'not') { }
17 47 elsif ($operand eq 'expression') { }
47 0 elsif ($operand eq 'dot') { }
580 4 4 unless $func and ref $func eq 'CODE'
586 1 4 unless $obj
589 0 4 unless $func
591 1 3 if (blessed $obj and $obj->can($func)) { }
1 2 elsif (ref $obj eq 'HASH' and ref $$obj{$func} eq 'CODE') { }
609 11 15 if ($op eq '?') { }
611 6 5 if (true($left))
616 7 8 unless (true($left))
625 4 45 if (blessed $left) { }
27 18 elsif (ref $left eq 'HASH') { }
9 9 elsif (ref $left eq 'ARRAY') { }
627 2 2 if (ref $key and ref $key eq 'ARRAY' and $$key[0] eq 'methcall') { }
634 1 1 unless defined $key and $left->can($key)
639 2 25 if (ref $key and ref $key eq 'ARRAY' and $$key[0] eq 'methcall') { }
645 0 25 unless defined $key
650 1 8 unless defined $key