Branch Coverage

blib/lib/Lingua/Romana/Perligata.pm
Criterion Covered Total %
branch 154 360 42.7


line true false branch
37 0 4 if $status < 0
45 0 0 if print $_
0 4 if ($translate) { }
0 8 elsif ($debug and /\S/) { }
58 4 0 unless $_[0] =~ /(.*)at\s+(\S+)\s+line\s+(\d+)(.*)/s
91 0 2 unless join('', @numerals) eq $val
104 0 0 if $_[0] == 0
106 0 0 if grep {/\D/;} @digits
115 0 0 if (wantarray) { }
117 0 0 $1 ? :
122 0 0 $1 ? :
159 160 68 unless $genkey =~ s/$from$/$to/
649 0 56 if ($text =~ s/\A(adnota.*)//i) { }
0 56 elsif ($text =~ s/\A(nuntius|finis)[ \t]*[.]?[ \t]*\n(.*)//ism) { }
0 56 elsif ($text =~ s/\Adic(?:emen)?tum(que|ve|)\s+sic\s+\b(.*?)\s+cis\b//is) { }
0 56 elsif ($text =~ s/\Asic(que|ve|)\s+(.*?)\s+cis\s+dic(?:emen)?tum\b//is) { }
0 56 elsif ($text =~ s/\A(atque|vel)\b//i) { }
0 56 elsif ($text =~ s/\A(($roman)im(?:o|ae)(que|ve|))\b//xi and length $2) { }
0 56 elsif ($text =~ s/\A(($roman)im(?:um|os|am|as)(que|ve|))\b//xi and length $2) { }
2 54 elsif ($text =~ s/\A(($roman)(que|ve|))\b//xi and length $2) { }
0 54 elsif ($text =~ s/$tokensque//i) { }
0 54 elsif ($text =~ s/$tokensve//i) { }
38 16 elsif ($text =~ s/$tokens//i) { }
0 16 elsif ($text =~ s/\A(([a-z]+?)(um|)ementum)(que|ve|)\b//i) { }
0 16 elsif ($text =~ s/\A(([a-z]+?)(um|)ementa)(que|ve|)\b//i) { }
0 16 elsif ($text =~ s/\A(([a-z]+?)(um|)emento)(que|ve|)\b//i) { }
0 16 elsif ($text =~ s/\A(([a-z]+?)(um|)ementis)(que|ve|)\b//i) { }
0 16 elsif ($text =~ s/\A(([a-z]+)orum)(que|ve|)\b//i) { }
0 16 elsif ($text =~ s/\A(([a-z]+)uum)(que|ve|)\b//i) { }
4 12 elsif ($text =~ s/\A(([a-z]+)um)(que|ve|)\b//i) { }
0 12 elsif ($text =~ s/\A(([a-z]+)a)(que|ve|)\b//i) { }
0 12 elsif ($text =~ s/\A(([a-z]+)ibus)(que|ve|)\b//i) { }
0 12 elsif ($text =~ s/\A(([a-z]+)us)(que|ve|)\b//i) { }
0 12 elsif ($text =~ s/\A(([a-z]+)o)(que|ve|)\b//i) { }
0 12 elsif ($text =~ s/\A(([a-z]+)is)(que|ve|)\b//i) { }
0 12 elsif ($text =~ s/\A(([a-z]+)tori)(que|ve|)\b//i) { }
0 12 elsif ($text =~ s/\A(([a-z]+)i)(que|ve|)\b//i) { }
2 10 elsif ($text =~ s/\A(([a-z]+)ere)(que|ve|)\b//i) { }
2 8 elsif ($text =~ s/\A(([a-z]+?)(um|)e)(que|ve|)\b//i) { }
0 8 elsif ($text =~ s/\A(([a-z]+)torem)(que|ve|)\b//i) { }
4 4 elsif ($text =~ s/\A([.])//) { }
2 2 elsif ($text =~ s/\A(\S+)(que|ve|)\b//) { }
665 0 0 if $1
670 0 0 if $1
680 0 0 if $+
685 0 0 if $+
690 0 2 if $+
709 0 0 if $4
710 0 0 $3 ? :
715 0 0 if $4
716 0 0 $3 ? :
721 0 0 if $4
722 0 0 $3 ? :
737 0 0 if $3
742 0 0 if $3
747 0 4 if $3
752 0 0 if $3
757 0 0 if $3
762 0 0 if $3
767 0 0 if $3
772 0 0 if $3
777 0 0 if $3
782 0 0 if $3
787 0 2 if $3
792 0 2 if $4
793 0 2 $3 ? :
798 0 0 if $3
807 0 2 if $2
808 2 0 if $1
812 2 0 unless $text =~ s/\A(\S+)//
817 54 0 if @tokens
819 0 4 if ($lex || $debug and @tokens)
827 0 0 if $lex
830 0 4 if $bad
859 6 8 if ($Astack[-1]{'complete'}) { }
860 0 6 if @Astack > 1
871 12 12 unless (@Vstack)
872 0 12 if (@Dstack and ($Dstack[-1]{'V'}{'lex'} || '') eq 'OWNER_D')
878 6 6 if $Vstack[-1]{'lex'} =~ /^SUBNAME_?A?D?$/ and not $lookahead->{'lex'} =~ /PERIOD|DO|END|CONNECTIVE/ or ref $Vstack[-1] eq 'STATEMENT'
882 2 0 $verb->{'lex'} eq 'SUBNAME' ? :
885 0 6 if $needA and $needA ne 'OA' and @Astack <= 1 || !$Astack[-1]{'complete'} or $needD eq 'D' and not @Dstack or $needD eq 'B' and not @Bstack
887 0 4 $needD eq 'B' ? :
2 4 $needD eq 'D' ? :
890 6 0 $needA && @Astack > 1 ? :
892 0 6 if ($verb->{'lex'} =~ /SUBNAME_.*_ACCUSATIVE/ or $Dindir and $verb->{'lex'} =~ /SUBNAME_.*_DATIVE|OWNER_D/) { }
2 4 elsif ($verb->{'lex'} =~ /SUBNAME_.*_DATIVE|OWNER_D/) { }
0 4 elsif ($verb->{'lex'} =~ /SUBNAME_.*_GENITIVE/) { }
895 0 0 if ($verb->{'lex'} =~ /SUBNAME_.*_DATIVE|OWNER_D/)
908 0 0 unless $lastsubstantive
914 0 0 if $ord->{'lex'} and $ord->{'lex'} eq 'NUMERAL'
919 0 6 if ($debug)
927 0 42 if ($debug)
930 6 36 if ($tok->{'lex'} =~ /^(NUMERAL|ORDINAL)$/ or $Dindir and $tok->{'lex'} eq 'ORDINAL_DATIVE') { }
0 36 elsif ($tok->{'lex'} eq 'ORDINAL_DATIVE') { }
0 36 elsif ($tok->{'lex'} eq 'WITH') { }
8 28 elsif ($tok->{'lex'} =~ /^(?:ACCUSATIVE|NAME)$/ or $Dindir and $tok->{'lex'} eq 'DATIVE') { }
0 28 elsif ($tok->{'lex'} eq 'ARROW') { }
0 28 elsif ($tok->{'lex'} eq 'WITHIN') { }
2 26 elsif ($tok->{'lex'} eq 'GENITIVE') { }
2 24 elsif ($tok->{'lex'} eq 'INFINITIVE') { }
0 24 elsif ($tok->{'lex'} eq 'CONTROL') { }
2 22 elsif ($tok->{'lex'} eq 'FOR') { }
0 22 elsif ($tok->{'lex'} eq 'BEGIN') { }
0 22 elsif ($tok->{'lex'} eq 'OWNER_D') { }
8 14 elsif ($tok->{'lex'} eq 'COMMA') { }
0 14 elsif ($tok->{'lex'} eq 'ADDRESS') { }
2 12 elsif ($tok->{'lex'} eq 'DATIVE') { }
6 6 elsif ($tok->{'lex'} =~ /^SUBNAME/) { }
4 2 elsif ($tok->{'lex'} =~ /PERIOD/) { }
0 2 elsif ($tok->{'lex'} =~ /CONNECTIVE/) { }
2 0 elsif ($eatend and $tok->{'lex'} =~ /$eatend/) { }
0 0 elsif ($noeatend and $tok->{'lex'} =~ /$noeatend/) { }
933 0 6 if ($1 eq 'NUMERAL' and $toks->[0]{'lex'} eq 'ORDINAL')
938 0 6 if ($tok->{'lex'} eq 'ORDINAL_DATIVE')
959 0 8 if ($tok->{'lex'} eq 'DATIVE')
972 0 0 $owner->{'perl'} =~ /^\W/ ? :
988 0 2 unless @lastsubstantive
994 0 2 if $ord->{'lex'} and $ord->{'lex'} eq 'NUMERAL'
1011 2 6 unless $lastownable and @Astack > 1 and $lastownable == $Astack[-1]{'data'}
1013 0 8 unless @Astack > 1 and $Astack[-1]{'complete'}
1028 6 0 if ($Astack[-1]{'complete'}) { }
0 0 elsif (not $tok->{'perl'} =~ /^(and|or|[&|]{2})$/) { }
1050 0 4 if $connective and not $Vdone || @Astack <= 1
1058 0 0 unless $Vdone or @Astack <= 1
1064 0 2 @Astack > 1 ? :
2 0 unless $Vdone
1069 0 0 unless $Vdone
1077 0 32 if ($debug)
1083 0 0 !($Vstack[-1]{'lex'} =~ /(ACCUSATIVE|DATIVE)$/) ? :
0 10 if $Vdone and @Vstack
1090 0 10 if @Astack > 1 and not @Vstack
1092 0 10 if @Dstack and not @Vstack
1094 0 10 unless $Vdone or $empty
1096 0 6 ref $Vdone eq 'ARRAY' ? :
4 6 $empty ? :
1107 0 4 unless $next->{'lex'} eq 'BEGIN'
1110 4 0 if $command
1114 0 4 unless $next->{'lex'} eq 'END'
1135 0 0 $toks->[0]{'lex'} ne 'IN' ? :
2 0 $toks->[0]{'lex'} eq 'ACCUSATIVE' ? :
1138 0 2 unless $in->{'lex'} eq 'IN'
1141 0 2 unless (($self->{'C'}{'lex'} || $self->{'C'}{'V'}{'lex'}) =~ /DATIVE|OWNER_D/)
1144 0 0 $self->{'C'}{'lex'} ? :
1147 0 2 if ($toks->[0]{'lex'} =~ /PERIOD|CONNECTIVE/) { }
1148 0 0 unless @$Bstack
1151 0 0 unless $toks->[0]{'lex'} eq 'CONNECTIVE'
1164 0 0 if (($self->{'perl'} || '') eq 'while' and ($self->{'C'}{'V'}{'perl'} || '') eq 'Lingua::Romana::Perligata::getline')
1168 0 0 if (not @$toks or $toks->[0]{'lex'} =~ /PERIOD|CONNECTIVE/) { }
1169 0 0 unless @$Bstack
1172 0 0 unless $toks->[0]{'lex'} eq 'CONNECTIVE'
1209 2 4 defined $_[0]{'D'} ? :
1210 0 6 $verb =~ /^(bless)$/ && $dative =~ /^[%\@]/ ? :
1211 2 4 if $dative
1212 0 6 $dative && defined $_[0]{'A'} && !$hasblock && !($verb =~ /^(print|printf)$/) ? :
1213 0 6 if ($verb =~ /^(package|use)$/) { }
0 6 elsif ($verb eq ':') { }
0 6 elsif ($_[0]{'V'}{'diamond'}) { }
0 6 elsif ($verb =~ /^[\$%\@]\{$/) { }
6 0 elsif (not $_[0]{'V'}{'operator'}) { }
0 0 elsif ($prefix and $dative) { }
0 0 elsif ($prefix) { }
0 0 elsif ($verb eq '=') { }
1230 0 6 $noparen ? :
6 0 defined $_[0]{'A'} ? :
0 6 $noparen ? :
1245 0 0 @{$_[0]{'A'};} > 1 ? :
1250 0 0 unless $_[0]{'A'}
1251 0 0 $verb =~ s/^!(<=>|cmp)/$1/ ? :
1257 0 0 $Acount-- ? :
0 0 $dative ? :
0 0 $Acount ? :
1260 0 6 if ($_[0]{'G'})
1361 0 2 if ($self->{'G'})
1380 0 4 if ($self->{'G'})
1417 0 2 unless $self->{'G'}
1440 0 8 if ($context and $context->{'raw'} =~ /^inque/) { }
0 8 elsif ($self->{'lex'} eq 'GENITIVE') { }
0 8 elsif ($self->{'lex'} eq 'SUBNAME_A_GENITIVE') { }
2 6 elsif ($self->{'lex'} eq 'INFINITIVE') { }
1455 0 8 if ($self->{'G'})