Branch Coverage

blib/lib/Makefile/Parser.pm
Criterion Covered Total %
branch 90 240 37.5


line true false branch
37 2374 1215 unless ($res)
47 0 15 if $vars
63 2 13 unless (open $in, $file)
75 364 2883 if /^\s*#/ and $state ne 'S_IN_VAL'
76 981 1902 if /^\s*$/ and $state ne 'S_IN_VAL'
90 271 1631 if ($state eq 'S_IDLE' || $state eq 'S_CMD' and /^(\w+) \s* :?= \s* (.*)$/ox) { }
58 1573 elsif ($state eq 'S_IN_VAL') { }
2 1571 elsif ($state eq 'S_IDLE' || $state eq 'S_CMD' and /^(\.\w+) (\.\w+) \s* (::?)\s*$/ox) { }
599 972 elsif ($state eq 'S_IDLE' || $state eq 'S_CMD' and /^(\S[^:]*) (::?) \s* (.*)$/ox) { }
14 958 elsif ($state eq 'S_IN_DEPENDS' and /^\s+ (.*)$/ox) { }
825 133 elsif ($state eq 'S_CMD' and /^\s+(.*)/o) { }
133 0 elsif ($state eq 'S_IN_CMD' and /^\s+(.*)/o) { }
0 0 elsif ($Strict) { }
94 29 242 if ($value =~ /\\\s*$/) { }
111 29 29 unless ($line =~ /\\\s*$/)
135 0 599 if ($depends =~ s/;(.*)//)
140 1 598 if $tar_name eq '.SUFFIXES'
144 3 595 if (my $old_tars = $tars{$tar_name}) { }
145 2 1 if ($colon_type eq ':') { }
147 1 1 if (my(@cmd) = $$old_tars[0]->commands)
157 9 589 if ($tar_name =~ /%/)
160 13 585 if ($first_tar)
164 14 584 if ($depends =~ s/\s+\\$//o) { }
173 0 598 if defined $cmd
177 14 0 unless ($depends =~ s/\s+\\$//o)
187 35 790 if ($cmd =~ s/\s+\\$//o) { }
195 35 98 unless ($cmd =~ s/\s+\\$//o)
219 9 933 if /%/
233 0 72 unless $obj and ref $obj
237 15 57 if ($depend =~ /^$regex$/)
264 1 25 unless defined $$self{'_file'}
270 1 1 unless defined $$self{'_file'}
276 2 94 unless defined $$self{'_file'}
277 2 94 unless defined $tar_name
280 3 91 wantarray ? :
285 1 4 unless defined $$self{'_file'}
291 1 5 unless defined $$self{'_file'}
298 162 25 if $depends{$key}
310 0 1902 unless $tokens
314 1217 4059 if ($token =~ /^\$[{(](.*)[)}]$/) { }
369 3690 elsif ($token =~ /^\$[\@<|]$/) { }
0 3690 elsif ($token =~ /^\$\$$/) { }
101 3589 elsif ($token =~ /^\$(.)$/) { }
316 0 1217 if ($s =~ /^([-\w]+)\s+(.*)$/) { }
0 1217 elsif ($s =~ /^(\S+?):(\S+?)=(\S+)$/) { }
318 0 0 if (defined $res)
327 0 0 if (defined $res)
332 1216 1 if (exists $$rvars{$s}) { }
346 0 101 if (exists $$rvars{$1}) { }
368 3103 3589 if ($s =~ /\G[^\$]+/cg) { }
1217 2372 elsif (my $res = _extract_interp($s)) { }
470 1902 elsif ($s =~ /\G\$./cg) { }
0 1902 elsif ($s =~ /\G./cg) { }
387 0 0 if ($capture) { }
403 0 0 if (not $n =~ /^\d+$/)
412 0 0 if ($n <= $value)
433 0 0 if ($s =~ /\G\s+/cg) { }
0 0 elsif ($s =~ /\G[^\$,]+/cg) { }
0 0 elsif ($s =~ /\G,/cg) { }
0 0 elsif (my $res = _extract_interp($s)) { }
0 0 elsif ($s =~ /\G\$./cg) { }
0 0 elsif ($s =~ /\G./cg) { }
440 0 0 if (@args < $n - 1) { }
457 0 0 if (@args <= $n - 1)
460 0 0 if @args >= $m and @args <= $n
472 0 0 unless @$tokens
473 0 0 if ($$tokens[0] =~ /^\s+$/)
476 0 0 unless @$tokens
477 0 0 if ($$tokens[-1] =~ /^\s+$/)
488 0 0 if ($name eq 'subst')
497 0 0 if ($name eq 'patsubst')
513 0 0 if ($name eq 'strip')
521 0 0 if ($name eq 'findstring')
525 0 0 if (index($in, $find) >= 0) { }
540 0 0 if ($name eq 'filter')
552 0 0 if ($name eq 'filter-out')
564 0 0 if ($name eq 'sort')
571 0 0 if ($name eq 'words')
578 0 0 if ($name eq 'word')
586 0 0 $n > @words ? :
588 0 0 if ($name eq 'wordlist')
598 0 0 if ($s > $e or $s > @words or $e == 0)
601 0 0 if $e > @words
604 0 0 if ($name eq 'firstword')
609 0 0 @words > 0 ? :
611 0 0 if ($name eq 'lastword')
616 0 0 @words > 0 ? :
618 0 0 if ($name eq 'dir')
623 0 0 m[.*/] ? :
625 0 0 if ($name eq 'notdir')
632 0 0 if ($name eq 'suffix')
637 0 0 /.*(\..*)/ ? :
641 0 0 if ($name eq 'basename')
646 0 0 /(.*)\./ ? :
650 0 0 if ($name eq 'addsuffix')
658 0 0 if ($name eq 'addprefix')
666 0 0 if ($name eq 'join')
677 0 0 if ($name eq 'wildcard')
683 0 0 if ($name eq 'realpath')
691 0 0 if ($name eq 'abspath')
701 0 0 if ($_ eq '..') { }
711 0 0 if ($name eq 'shell')
720 0 0 if ($name eq 'if')
726 0 0 $condition eq '' ? :
731 0 0 if ($name eq 'or')
737 0 0 if $value ne ''
741 0 0 if ($name eq 'and')
749 0 0 if $value eq ''
753 0 0 if ($name eq 'foreach')
772 0 0 if ($not_exist) { }
780 0 0 if ($name eq 'error')
784 0 0 if $Runtime
787 0 0 if ($name eq 'warning')
793 0 0 if ($name eq 'info')
853 832 9 unless ($name =~ /%/)
865 0 0 if ($cmd =~ s/^\s*\@//) { }
0 0 elsif ($cmd =~ s/^\s*-//) { }
874 0 0 if $cmd =~ /^$/
875 0 0 unless $quiet
878 0 0 if ($? != 0 and not $continue)