Branch Coverage

blib/lib/Locale/Babelfish/Phrase/Parser.pm
Criterion Covered Total %
branch 45 52 86.5


line true false branch
31 0 5 if $locale
48 72 5 if ($self->mode eq 'Locale::Babelfish::Phrase::Literal') { }
0 5 elsif ($self->mode eq 'Locale::Babelfish::Phrase::Variable') { }
5 0 elsif ($self->mode eq 'Locale::Babelfish::Phrase::PluralForms') { }
50 69 3 if length $self->piece or scalar @{$self->pieces;} == 0
56 0 5 unless defined $self->pf0
70 12 67 if $locale
77 77 1181 unless (length $char)
82 646 535 if ($self->mode eq 'Locale::Babelfish::Phrase::Literal')
83 4 642 if ($self->escape)
89 4 638 if ($char eq '\\')
94 20 618 if ($char eq '#' and $self->next_char eq '{')
95 16 4 if (length $self->piece)
104 17 601 if ($char eq '(' and $self->next_char eq '(')
105 17 0 if (length $self->piece)
115 119 1017 if ($self->mode eq 'Locale::Babelfish::Phrase::Variable')
116 0 119 if ($self->escape)
122 0 119 if ($char eq '\\')
127 20 99 if ($char eq '}')
129 1 19 unless (length $name)
132 1 18 unless ($name =~ /^[a-zA-Z0-9_\.]+$/)
142 416 700 if ($self->mode eq 'Locale::Babelfish::Phrase::PluralForms')
143 62 354 if (defined $self->pf0)
144 54 8 if ($char =~ /^[a-zA-Z0-9_\.]+$/ and $char ne '.' || $self->next_char =~ /^[a-zA-Z0-9_\.]+$/) { }
157 17 337 if ($char eq ')' and $self->next_char eq ')')
161 13 4 if ($self->next_char eq ':')