Branch Coverage

lib/Text/PO/Element.pm
Criterion Covered Total %
branch 51 94 54.2


line true false branch
70 0 0 if (@_)
73 0 0 if length $self->{'file'} and not ref $self->{'file'}
74 0 0 if length $self->{'line'} and not ref $self->{'line'}
75 0 0 if ($self->_is_array($_[0])) { }
99 0 0 unless $po
107 0 8 if scalar @{$self->{'comment'};}
108 0 8 if scalar @{$self->{'auto_comment'};}
110 3 5 if length $ref
112 0 8 if (scalar @$flags)
116 0 8 if length $self->{'context'}
119 16 0 if ($self->can("${k}_as_string")) { }
126 0 0 if (ref $self->{$k} and scalar @{$self->{$k};}) { }
0 0 elsif (not ref $self->{$k} and length $self->{$k}) { }
153 2 19 if (ref $msgid) { }
171 0 0 unless $self->_is_object($elem) and $elem->isa("Text::PO::Element")
175 0 0 unless length $self->{$_}
195 7 1 unless length $self->{'msgid_plural'}
203 51 30 if (@_)
205 11 40 if (@_ == 2) { }
208 0 11 unless $pos =~ /^\d+$/
210 5 6 if ref $self->{'msgstr'} ne "ARRAY"
211 11 0 if ref $self->{'msgstr'}[$pos] ne "ARRAY"
216 37 3 unless (ref $_[0])
230 1 7 if ($self->plural) { }
239 0 2 if (scalar @$ref > 1) { }
247 2 0 if length $ref->[0]
265 2 14 if (ref $text and scalar @$text) { }
14 0 elsif (not ref $text and length $text) { }
274 2 14 if (scalar @$lines > 1) { }
293 15 16 if (@_)
295 0 15 if ($self->_is_array($_[0])) { }
299 0 0 if ($self->_is_array($_[0][0])) { }
319 12 19 unless length $self->{'file'} and length $self->{'line'}
320 0 19 if ref $self->{'file'} and not scalar @{$self->{'file'};}
321 0 19 if (ref $self->{'file'}) { }
341 2 14 if (length $text > $max) { }
346 2 0 if (length $lines->[$i] > $max) { }
369 0 2 unless length $text
374 2 2 unless $j == $#$newLines
386 7 36 unless ref $self->{$what}
395 50 95 if (@_)
397 47 3 if (not ref $_[0] and length $_[0])
401 5 45 if $name eq "msgid_plural"
411 0 0 if @_
412 0 0 if (ref $self->{$prop}) { }
414 0 0 wantarray ? :
418 0 0 wantarray ? :