Branch Coverage

blib/lib/Perl6/Rules.pm
Criterion Covered Total %
branch 0 344 0.0


line true false branch
61 0 0 unless $debug
62 0 0 defined $_ ? :
63 0 0 unless substr($mesg, -1) eq "\n"
69 0 0 if $debug == 1
104 0 0 if $next < 0
105 0 0 if $next < 0
106 0 0 if ($next < 0)
114 0 0 unless $char ge 'a' and $char le 'z' or $char ge '0' and $char le '9' or $char eq '_'
122 0 0 if (substr($var, 0, 2) eq '$?') { }
0 0 elsif (substr($var, 0, 2) eq '@?') { }
123 0 0 if ($follow2 eq '.{' or $follow2 eq '.[')
129 0 0 if ($follow1 eq '[') { }
0 0 elsif ($follow2 eq '.[') { }
141 0 0 if ($follow1 eq '{') { }
0 0 elsif ($follow2 eq '.{') { }
174 0 0 if ($special eq '@') { }
0 0 elsif ($special eq '%') { }
0 0 elsif (($special = index($var, '.')) > 0) { }
0 0 elsif (($special = index($var, '[')) > 0 or ($special = index($var, '{')) > 0) { }
176 0 0 unless $subscriptpos > 0
179 0 0 $subscripts ? :
183 0 0 unless $subscriptpos > 0
186 0 0 $subscripts ? :
209 0 0 $quotemeta eq 'rw' ? :
215 0 0 $quotemeta ? :
234 0 0 if ($special eq '@?') { }
0 0 elsif ($special eq '%?') { }
0 0 elsif (($special = index($var, '.')) > 0) { }
0 0 elsif (($special = index($var, '[')) > 0 or ($special = index($var, '{')) > 0) { }
236 0 0 unless $subscriptpos > 0
239 0 0 $subscripts ? :
244 0 0 unless $subscriptpos > 0
247 0 0 $subscripts ? :
272 0 0 $quotemeta eq 'rw' ? :
278 0 0 $quotemeta ? :
292 0 0 $quotemeta ? :
302 0 0 $quotemeta eq 'map quotemeta,' ? :
311 0 0 $quotemeta ? :
321 0 0 $quotemeta eq 'map quotemeta,' ? :
349 0 0 $quotemeta ? :
367 0 0 $quotemeta ? :
389 0 0 $quotemeta ? :
399 0 0 exists $keymatch{$hashref} ? :
408 0 0 unless exists $valuematch{$hashref}
416 0 0 unless $mod{'words'}
426 0 0 pop @failure ? :
436 0 0 if ($nested)
440 0 0 if $type eq ')>'
455 0 0 if $capture
460 0 0 if ((my $index = index($subrule, '.')) > 0) { }
469 0 0 if ($rulename eq 'prior') { }
0 0 elsif ($rulename eq 'self') { }
470 0 0 if $negate eq '-'
475 0 0 if $negate eq '-'
479 0 0 $negate eq '-' ? :
483 0 0 if $repeat
490 0 0 if ($repeat and $capture) { }
0 0 elsif ($repeat) { }
0 0 elsif ($capture) { }
502 0 0 if ($negate eq '!')
512 0 0 unless $rep
514 0 0 if (substr($rep, 0, 1) eq '<')
516 0 0 if ($comma > 0) { }
520 0 0 if grep {$sigil{substr $_, 0, 1};} $from, $to
525 0 0 if $sigil{substr $from, 0, 1}
542 0 0 if length($p5pat[-1] || '') > 1
552 0 0 @capindex ? :
553 0 0 $name ? :
0 0 unless $sigil and $sigil eq '@' || $sigil eq '%'
556 0 0 if $name
583 0 0 if @neg
584 0 0 @pos ? :
590 0 0 unless @mark
594 0 0 if $subsigil ne '?'
597 0 0 unless $sigil eq '@' or $sigil eq '%'
600 0 0 if ($sigil eq '$') { }
0 0 elsif ($sigil eq '@') { }
0 0 elsif ($sigil eq '%') { }
633 0 0 unless $from >= 0
635 0 0 if $to == 0
649 0 0 unless $from >= 0
651 0 0 if $to == 0
655 0 0 @chars > 1 ? :
669 0 0 $sign eq '-' ? :
673 0 0 $neg ? :
677 0 0 unless $from >= 0
679 0 0 if $to == 0
689 0 0 $neg ? :
693 0 0 unless $from >= 0
695 0 0 if $to == 0
705 0 0 $neg ? :
0 0 unless $pat eq '[]'
713 0 0 unless @mark
718 0 0 unless $sigil eq '@' or $sigil eq '%'
720 0 0 if ($sigil eq '$') { }
0 0 elsif ($sigil eq '@') { }
0 0 elsif ($sigil eq '%') { }
766 0 0 unless @mark
795 0 0 unless @mark
803 0 0 unless @mark
1430 0 0 unless (ref $pat || '') eq 'Regexp'
1445 0 0 if ($mod eq 'words' or $mod eq 'w') { }
0 0 elsif ($mod eq 'globally' or $mod eq 'g') { }
0 0 elsif ($mod eq 'exhaustive' or $mod eq 'e') { }
0 0 elsif ($mod eq 'overlap' or $mod eq 'o') { }
0 0 elsif ($mod eq 'ignore' or $mod eq 'i') { }
0 0 elsif ($mod eq 'cont' or $mod eq 'c') { }
0 0 elsif (length $mod > 5 and substr($mod, 0, 4) eq 'nth(' and substr($mod, -1) eq ')') { }
0 0 elsif (length $mod > 2 and substr($mod, 0, 1) ne 'n' and substr($mod, -2) eq 'th' || substr($mod, -2) eq 'st' || substr($mod, -2) eq 'nd' || substr($mod, -2) eq 'rd') { }
0 0 elsif (length $mod > 3 and substr($mod, 0, 2) eq 'x(' and substr($mod, -1) eq ')') { }
0 0 elsif (length $mod > 1 and substr($mod, -1) eq 'x') { }
0 0 elsif (substr($mod, 0, 3) eq 'nth' or substr($mod, 0, 1) eq 'x') { }
0 0 elsif (exists $unimpl{$mod}) { }
0 0 elsif (length $mod > 1) { }
0 0 elsif (length $mod) { }
1456 0 0 if $mod{'overlap'}
1462 0 0 if $mod{'exhaust'}
1551 0 0 $invert ? :
1553 0 0 if (defined $stdrule) { }
0 0 elsif (index($name, '.') >= 0) { }
0 0 elsif ($invert) { }
1561 0 0 if $name eq 'Lr'
1566 0 0 if $name eq 'Lr'
1595 0 0 $sign eq '-' ? :
1599 0 0 if ($insign eq '-') { }
0 0 elsif ($insign eq '!') { }
1610 0 0 if $name eq 'Lr'
1611 0 0 $neg ? :
1714 0 0 unless $data =~ s/do { new() }(?{new})($rx)/to_qms('qr');/egx
1728 0 0 unless $data =~ s/do { new() }(?{new})($rx)/to_qms('qr');/egx
1753 0 0 if $type eq 'qr'
1763 0 0 $has_prior ? :
1765 0 0 exists $mod{'post'}{'gc'} ? :
0 0 exists $mod{'rep'} && $type eq 's' ? :
0 0 exists $mod{'rep'} && $type eq 'm' ? :
0 0 exists $mod{'nth'} ? :
0 0 exists $mod{'nth'} && ($mod{'post'}{'g'} || $mod{'post'}{'gc'}) ? :
1779 0 0 if (exists $mod{'rep'} and $mod{'post'}{'g'} || $mod{'post'}{'gc'})
1782 0 0 if $repcontrol and $type eq 's' and not $mod{'post'}{'gc'}
1784 0 0 exists $mod{'rep'} && $type eq 'm' ? :
0 0 !$repcontrol ? :
1787 0 0 $repcontrol && $type eq 'm' ? :
1789 0 0 $repcontrol ? :
1791 0 0 if exists $mod{'nth'} and $type ne 'm' and $type ne 's'
1793 0 0 if exists $mod{'rep'} and $type ne 'm' and $type ne 's'
1807 0 0 $mod{'exhaust'} || $mod{'overlap'} ? :
1810 0 0 $mod{'overlap'} ? :
0 0 $mod{'exhaust'} ? :
1816 0 0 unless $translate or $bad
1824 0 0 if ($repl)
1836 0 0 if ($from_s >= 0 and $to >= 0) { }
0 0 elsif ($from_l >= 0 and $to >= 0) { }
1863 0 0 unless $arrayref and @$arrayref
1866 0 0 if (not defined $_) { }
0 0 elsif (ref $_ ne 'ARRAY') { }
1878 0 0 if (not defined $$hashref{''}) { }
1885 0 0 if (not defined $_) { }
0 0 elsif (ref $_ ne 'ARRAY') { }
1921 0 0 if $overlap and $exhaust ne 'done' and $Perl6::Rules::startpos <= $Perl6::Rules::lastpos
1922 0 0 unless defined $Perl6::Rules::d0[0]
1927 0 0 if ($sigil eq '$') { }
0 0 elsif ($sigil eq '@' and $subsigil eq '?') { }
0 0 elsif ($sigil eq '%' and $subsigil eq '?') { }
0 0 elsif ($subsigil ne '?') { }
1928 0 0 if ($subsigil eq '?') { }
1957 0 0 if ($exhaust ne 'done') { }
1964 0 0 if ($exhaust)
1992 0 0 if (ref $val eq 'Perl6::Rules::Match') { }
0 0 elsif (ref $val eq 'ARRAY') { }
0 0 elsif (ref $val eq 'HASH') { }
0 0 elsif (not defined $val) { }
1993 0 0 $val ? :