Branch Coverage

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


line true false branch
31 0 7 if $locale
48 282 7 if ($self->mode eq 'Locale::Babelfish::Phrase::Literal') { }
0 7 elsif ($self->mode eq 'Locale::Babelfish::Phrase::Variable') { }
7 0 elsif ($self->mode eq 'Locale::Babelfish::Phrase::PluralForms') { }
50 237 45 if length $self->piece or scalar @{$self->pieces;} == 0
56 0 7 unless defined $self->pf0
70 190 101 if $locale
77 289 3281 unless (length $char)
82 2014 1267 if ($self->mode eq "Locale::Babelfish::Phrase::Literal")
83 10 2004 if ($self->escape)
89 10 1994 if ($char eq "\\")
94 70 1924 if ($char eq "#" and $self->next_char eq "{")
95 34 36 if (length $self->piece)
104 29 1895 if ($char eq "(" and $self->next_char eq "(")
105 29 0 if (length $self->piece)
115 569 2593 if ($self->mode eq "Locale::Babelfish::Phrase::Variable")
116 0 569 if ($self->escape)
122 0 569 if ($char eq "\\")
127 70 499 if ($char eq "}")
129 1 69 unless (length $name)
132 1 68 unless ($name =~ /^[a-zA-Z0-9_\.]+$/)
142 698 2394 if ($self->mode eq "Locale::Babelfish::Phrase::PluralForms")
143 120 578 if (defined $self->pf0)
144 102 18 if ($char =~ /^[a-zA-Z0-9_\.]+$/ and $char ne '.' || $self->next_char =~ /^[a-zA-Z0-9_\.]+$/) { }
157 29 549 if ($char eq ")" and $self->next_char eq ")")
161 25 4 if ($self->next_char eq ":")