Branch Coverage

blib/lib/Language/FP.pm
Criterion Covered Total %
branch 56 138 40.5


line true false branch
15 0 0 if ($main::FP_DEBUG =~ /b/)
23 0 2514 @_ > 0 && !defined($_[0]) ? :
43 0 182 if $main::FP_DEBUG =~ /p/
47 0 25222 if $main::FP_DEBUG =~ /r/
60 126 1359 if (ref $a eq 'ARRAY') { }
69 4384 6 if (@_ == 1) { }
97 0 66 if (ref $sym eq $type)
103 66 24 if (defined($thing = *{$x;}{$type}))
108 33 33 if (wantarray) { }
120 67 1 if $P
121 0 1 unless $P = 'Parse::RecDescent'->new(qq[\n{\nuse Regexp::Common;\n BEGIN {\n\tno strict 'refs';\n\tforeach (qw|term findsym|) {\n\t *{__PACKAGE__.'::'.\$_} = \\&{'Language::FP::'.\$_};\n\t}\n }\n}\n\nthing:\t 'val' id_undef '=' application\n\t\t{ \$return = term 'val', \@item{qw(id_undef application)} }\n\t| 'def' id_undef '=' termlist\n\t\t{ \$return = term 'def', \@item{qw(id_undef termlist)} }\n\t| application\n\t\t{ \$return = \$item[1];1; }\n\t| /\\s*/\n\t| \n\napplication: termlist ':' data\n\t\t{ \$return = term 'application', \@item{qw(termlist data)}; }\n\t| data\n\t\t{ \$return = \$item[1]; }\n\ntermlist: 'while' complist termlist\n\t\t{ \$return = term 'while', \@item{qw(complist termlist)} }\n \t| complist '->' complist ';' termlist\n\t\t{ \$return = term 'if', \@item[1,4,6] }\n\t| complist \n\t\t{ \$return = \$item[1];1; }\n\t| \n\ncomplist: \n\t\t{ \$return = term 'compose', \@{\$item[1]} }\n\nfunc:\t 'bu' func data\n\t\t{ \$return = term 'bu', \@item{qw(func data)} }\n\t| '/' func\n\t\t{ \$return = term 'insert', \$item{func} }\n\t| '\@' func\n\t\t{ \$return = term 'forall', \$item{func} }\n\t| '(' termlist ')'\n\t\t{ \$return = \$item{termlist} }\n\t| '[' ']'\n\t\t{ \$return = term 'distribute', \@{\$item[3]} }\n\t| '`' data\n\t\t{ \$return = term 'constant', \$item{data} }\n\t| sfunc\n\t\t{ \$return = \$item[1];1; }\n\t| id\n\t\t{ \$return = \$item[1];1; }\n\t| \n\ndata:\t datum\n\t\t{ \$return = term 'data', \$item[1] }\n\t| \n\ndatum:\t '<' datum(s?) '>'\n\t\t{ \$return = \$item[3];1; }\n\t| /\$RE{num}{real}/o\n\t\t{ \$return = \$item[1];1; }\n \t| /\$RE{num}{int}/o\n\t\t{ \$return = \$item[1];1; }\n\t| /\$RE{quoted}/o\n\t\t{ \$return = substr(\$item[1], 1, length(\$item[1]) - 2);1; }\n\t| m{[a-rt-zA-Z_][\\w\\d]*}\n\t {\n\t\tno strict 'refs';\n\t\t# XXX: actually interpolate variables during parse.\n\t\t\$return = findsym(\$item[1], 'ARRAY') || undef;\n\t}\n\t| \n\nsfunc:\t /\\d+/\n\t\t{ \$return = term 'sfunc', \$item[1]; }\n\nid_undef: m{[a-zA-Z_][\\w\\d]*}\n\t\t{ \$return = term 'id_undef', \$item[1]; }\n\nid:\t m{[a-zA-Z_][\\w\\d]*}\n\t\t{ \$return = term 'id', \$item[1];1; }\n\t| m{([!<>=]=) | [+*/<>-] | ([gln]e) | ([gl]t) | eq}x\n\t\t{ \$return = term 'op', \$item[1]; }\n\n])
336 0 490 if (bottom($test)) { }
302 188 elsif ($test) { }
353 46 459 unless ($test)
380 0 4 unless @_
382 0 4 if bottom($r)
385 0 53 if bottom($r)
407 33 1 if keys %ops > 0
458 126 305 if (ref $tree ne 'HASH')
462 305 0 if (exists $compile{$type}) { }
504 7 55 if (wantarray) { }
658 0 34 if $@
665 0 305 if (ref $tree ne 'HASH')
670 305 0 if (exists $compile{$type}) { }
687 0 576 if bottom(@_)
0 0 if bottom(@_)
0 0 if @_ == 1
0 0 if bottom(@_)
0 0 if bottom(@_)
0 0 @_ ? :
0 0 if bottom(@_)
0 0 @_ ? :
0 0 if bottom(@_)
0 0 if $_[0]
0 0 if bottom(@_)
0 0 if bottom(@_)
0 0 if bottom(@_)
0 0 if bottom(@_)
0 0 if bottom(@_)
0 0 @_ ? :
0 0 if bottom(@_)
0 0 @_ ? :
0 0 if bottom(@_)
0 0 @_ ? :
0 4 if bottom(@_)
0 4 unless CORE::not bottom($b) and ref $a eq 'ARRAY'
0 4 if bottom(@_)
0 2 if bottom(@_)
0 0 if bottom(@_)
0 342 if bottom(@_)
0 0 if bottom(@_)
0 0 @_ ? :
0 0 if bottom(@_)
0 0 unless $_[0]
0 4 if bottom(@_)
0 6 if bottom(@_)
0 6 unless CORE::not bottom($a) and ref $b eq 'ARRAY'
0 2 if bottom(@_)
0 2 unless @_
0 2 unless ref $_ eq 'ARRAY' and @$_ == $len
688 0 22 if $@
696 96 128 if (ref $_ eq 'ARRAY') { }
0 128 elsif (ref $_) { }
98 30 elsif (/$RE{'num'}{'int'}/o or /$RE{'num'}{'real'}/o) { }
30 0 elsif (defined $_) { }
719 68 0 if (@_ == 1)
722 0 68 unless ($parsed)
726 34 34 if ($main::FP_DEBUG =~ /C/) { }
739 0 0 unless ($res)