Branch Coverage

lib/Text/PO/Element.pm
Criterion Covered Total %
branch 68 124 54.8


line true false branch
80 0 0 if (@_)
83 0 0 if length $self->{'file'} and $self->_is_array($self->{'file'})
84 0 0 if length $self->{'line'} and $self->_is_array($self->{'line'})
85 0 0 if ($self->_is_array($_[0])) { }
109 0 0 unless $po
117 0 8 if ($self->is_include) { }
119 0 0 if scalar @{$self->{'comment'};}
120 0 0 if length($self->{'file'} // "")
124 0 8 if scalar @{$self->{'comment'};}
125 0 8 if scalar @{$self->{'auto_comment'};}
127 3 5 if length $ref
129 0 8 if (scalar @$flags)
133 0 8 if length $self->{'context'}
136 16 0 if ($self->can("${k}_as_string")) { }
143 0 0 if (ref $self->{$k} and scalar @{$self->{$k};}) { }
0 0 elsif (not ref $self->{$k} and length $self->{$k}) { }
171 4 91 if (ref $msgid) { }
191 0 0 unless $self->_is_object($elem) and $elem->isa("Text::PO::Element")
195 0 0 unless length $self->{$_}
211 4 80 $self->_is_array($self->{'msgid'}) ? :
222 14 2 unless length $self->{'msgid_plural'}
229 63 40 if (@_)
231 13 50 if (@_ == 2) { }
234 0 13 unless $pos =~ /^\d+$/
236 6 7 if ref $self->{'msgstr'} ne "ARRAY"
237 13 0 if ref $self->{'msgstr'}[$pos] ne "ARRAY"
242 47 3 unless (ref $_[0])
256 1 7 if ($self->plural) { }
265 0 2 if (scalar @$ref > 1) { }
273 2 0 if length $ref->[0]
287 4 11 $self->_is_array($self->{'msgstr'}) ? :
298 2 15 if (ref $text and scalar @$text) { }
15 0 elsif (not ref $text and length $text) { }
307 2 15 if (scalar @$lines > 1) { }
326 15 16 if (@_)
328 0 15 if ($self->_is_array($_[0])) { }
332 0 0 if ($self->_is_array($_[0][0])) { }
352 10 21 unless length $self->{'file'}
353 0 21 if $self->_is_array($self->{'file'}) and not scalar @{$self->{'file'};}
354 0 21 if ($self->_is_array($self->{'file'})) { }
359 0 0 $self->_is_array($self->{'line'}) ? :
374 2 15 if (length $text > $max) { }
379 2 0 if (length $lines->[$i] > $max) { }
402 0 2 unless length $text
407 2 2 unless $j == $newLines->$#*
419 18 53 unless ref $self->{$what}
429 1 49 $self->_is_array($self->{'msgid'}) ? :
430 14 36 if ($self->_is_a($other, 'Text::PO::Element')) { }
0 36 elsif (not defined $other) { }
432 3 11 $self->_is_array($self->{'msgstr'}) ? :
433 0 14 $self->_is_array($other->{'msgid'}) ? :
434 2 12 $self->_is_array($other->{'msgstr'}) ? :
435 0 14 ($msgid // '') eq ($other_msgid // '') && ($msgstr // '') eq ($other_msgstr // '') ? :
440 0 0 !defined($msgid) ? :
444 0 36 ($msgid // '') eq $other ? :
452 62 107 if (@_)
454 59 3 if (not ref $_[0] and length $_[0])
458 6 56 if $name eq "msgid_plural"
468 0 0 if @_
469 0 0 if (ref $self->{$prop}) { }
471 0 0 wantarray ? :
475 0 0 wantarray ? :