Branch Coverage

lib/Text/PO/MO.pm
Criterion Covered Total %
branch 61 316 19.3


line true false branch
57 0 1 unless defined $ref
66 1 10 if ($s =~ /^([^\x00-\x1f\x80-\xff :=]+):[[:blank:]]*(.*?)$/)
83 1 8 unless length $k
100 0 1 if ref $hash ne "HASH"
101 0 1 unless length $enc
102 0 1 if ($INC{'threads.pm'} and not exists $INC{'forks.pm'})
109 0 9 if length $k
113 1 0 if not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
0 0 &$Nice::Try::TRY ? :
0 0 if scalar @Nice::Try::VOID
0 0 if ($Nice::Try::WANT eq 'OBJECT') { }
0 0 elsif ($Nice::Try::WANT eq 'CODE') { }
0 0 elsif ($Nice::Try::WANT eq 'HASH') { }
0 0 elsif ($Nice::Try::WANT eq 'ARRAY') { }
0 0 elsif ($Nice::Try::WANT eq 'REFSCALAR') { }
0 0 elsif ($Nice::Try::WANT eq 'GLOB') { }
0 0 elsif ($Nice::Try::WANT eq 'LIST') { }
0 0 elsif ($Nice::Try::WANT eq 'BOOLEAN') { }
0 0 elsif ($Nice::Try::WANT eq 'VOID') { }
0 0 elsif ($Nice::Try::WANT eq 'SCALAR') { }
0 1 if defined $Nice::Try::LAST_VAL
0 1 if ($Nice::Try::WANTARRAY) { }
0 1 elsif (defined $Nice::Try::WANTARRAY) { }
0 1 if (defined $Nice::Try::WANT and length $Nice::Try::WANT) { }
0 1 length $@ ? :
1 0 unless &Scalar::Util::blessed($@)
0 0 if ($Nice::Try::HAS_CATCH)
0 1 if ($Nice::Try::DIED)
116 0 0 if not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
0 0 &$Nice::Try::CATCH ? :
0 0 if scalar @Nice::Try::VOID
0 0 if ($Nice::Try::WANT eq 'OBJECT') { }
0 0 elsif ($Nice::Try::WANT eq 'CODE') { }
0 0 elsif ($Nice::Try::WANT eq 'HASH') { }
0 0 elsif ($Nice::Try::WANT eq 'ARRAY') { }
0 0 elsif ($Nice::Try::WANT eq 'REFSCALAR') { }
0 0 elsif ($Nice::Try::WANT eq 'GLOB') { }
0 0 elsif ($Nice::Try::WANT eq 'LIST') { }
0 0 elsif ($Nice::Try::WANT eq 'BOOLEAN') { }
0 0 elsif ($Nice::Try::WANT eq 'VOID') { }
0 0 elsif ($Nice::Try::WANT eq 'SCALAR') { }
0 0 if ($Nice::Try::WANTARRAY) { }
0 0 elsif (defined $Nice::Try::WANTARRAY) { }
0 0 if (defined $Nice::Try::WANT and length $Nice::Try::WANT) { }
0 0 if (defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq '__NEXT__') { }
0 0 elsif (defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq '__LAST__') { }
0 0 elsif (defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq '__REDO__') { }
0 0 if ($Nice::Try::WANT eq 'LIST') { }
0 0 elsif ($Nice::Try::WANT eq 'VOID') { }
0 0 elsif ($Nice::Try::WANT eq 'OBJECT') { }
0 0 elsif ($Nice::Try::WANT eq 'REFSCALAR') { }
0 0 elsif ($Nice::Try::WANT eq 'SCALAR') { }
0 0 elsif ($Nice::Try::WANT eq 'BOOLEAN') { }
0 0 elsif ($Nice::Try::WANT eq 'CODE') { }
0 0 elsif ($Nice::Try::WANT eq 'HASH') { }
0 0 elsif ($Nice::Try::WANT eq 'ARRAY') { }
0 0 elsif ($Nice::Try::WANT eq 'GLOB') { }
0 0 $Nice::Try::WANTARRAY ? :
0 0 if (defined $Nice::Try::WANT and length $Nice::Try::WANT) { }
0 0 unless (defined $Nice::Try::BREAK)
0 0 if (defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL'))
0 0 if ($Nice::Try::BREAK eq 'next') { }
0 0 elsif ($Nice::Try::BREAK eq 'last') { }
0 0 elsif ($Nice::Try::BREAK eq 'redo') { }
0 1 if (defined $Nice::Try::BREAK)
0 1 scalar @Nice::Try::LAST_VAL > 1 ? :
129 0 9 if ref $hash ne "HASH"
130 0 9 unless length $enc
131 0 9 if ($INC{'threads.pm'} and not exists $INC{'forks.pm'})
136 1 35 if ($self->_is_array($hash->{$k})) { }
35 0 elsif (not ref $hash->{$k}) { }
140 0 0 if &Encode::is_utf8($hash->{$k}[$i])
145 8 27 &Encode::is_utf8($v) ? :
150 0 0 if not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
0 0 &$Nice::Try::TRY ? :
0 0 if scalar @Nice::Try::VOID
0 0 if ($Nice::Try::WANT eq 'OBJECT') { }
0 0 elsif ($Nice::Try::WANT eq 'CODE') { }
0 0 elsif ($Nice::Try::WANT eq 'HASH') { }
0 0 elsif ($Nice::Try::WANT eq 'ARRAY') { }
0 0 elsif ($Nice::Try::WANT eq 'REFSCALAR') { }
0 0 elsif ($Nice::Try::WANT eq 'GLOB') { }
0 0 elsif ($Nice::Try::WANT eq 'LIST') { }
0 0 elsif ($Nice::Try::WANT eq 'BOOLEAN') { }
0 0 elsif ($Nice::Try::WANT eq 'VOID') { }
0 0 elsif ($Nice::Try::WANT eq 'SCALAR') { }
0 0 if defined $Nice::Try::LAST_VAL
0 9 if ($Nice::Try::WANTARRAY) { }
9 0 elsif (defined $Nice::Try::WANTARRAY) { }
0 9 if (defined $Nice::Try::WANT and length $Nice::Try::WANT) { }
0 9 length $@ ? :
9 0 unless &Scalar::Util::blessed($@)
0 0 if ($Nice::Try::HAS_CATCH)
0 9 if ($Nice::Try::DIED)
153 0 0 if not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
0 0 &$Nice::Try::CATCH ? :
0 0 if scalar @Nice::Try::VOID
0 0 if ($Nice::Try::WANT eq 'OBJECT') { }
0 0 elsif ($Nice::Try::WANT eq 'CODE') { }
0 0 elsif ($Nice::Try::WANT eq 'HASH') { }
0 0 elsif ($Nice::Try::WANT eq 'ARRAY') { }
0 0 elsif ($Nice::Try::WANT eq 'REFSCALAR') { }
0 0 elsif ($Nice::Try::WANT eq 'GLOB') { }
0 0 elsif ($Nice::Try::WANT eq 'LIST') { }
0 0 elsif ($Nice::Try::WANT eq 'BOOLEAN') { }
0 0 elsif ($Nice::Try::WANT eq 'VOID') { }
0 0 elsif ($Nice::Try::WANT eq 'SCALAR') { }
0 0 if ($Nice::Try::WANTARRAY) { }
0 0 elsif (defined $Nice::Try::WANTARRAY) { }
0 0 if (defined $Nice::Try::WANT and length $Nice::Try::WANT) { }
0 0 if (defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq '__NEXT__') { }
0 0 elsif (defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq '__LAST__') { }
0 0 elsif (defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq '__REDO__') { }
0 0 if ($Nice::Try::WANT eq 'LIST') { }
0 0 elsif ($Nice::Try::WANT eq 'VOID') { }
0 0 elsif ($Nice::Try::WANT eq 'OBJECT') { }
0 0 elsif ($Nice::Try::WANT eq 'REFSCALAR') { }
0 0 elsif ($Nice::Try::WANT eq 'SCALAR') { }
0 0 elsif ($Nice::Try::WANT eq 'BOOLEAN') { }
0 0 elsif ($Nice::Try::WANT eq 'CODE') { }
0 0 elsif ($Nice::Try::WANT eq 'HASH') { }
0 0 elsif ($Nice::Try::WANT eq 'ARRAY') { }
0 0 elsif ($Nice::Try::WANT eq 'GLOB') { }
0 0 $Nice::Try::WANTARRAY ? :
0 0 if (defined $Nice::Try::WANT and length $Nice::Try::WANT) { }
0 0 unless (defined $Nice::Try::BREAK)
0 9 if (defined $Nice::Try::WANTARRAY and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL'))
0 0 if ($Nice::Try::BREAK eq 'next') { }
0 0 elsif ($Nice::Try::BREAK eq 'last') { }
0 0 elsif ($Nice::Try::BREAK eq 'redo') { }
0 9 if (defined $Nice::Try::BREAK)
0 9 scalar @Nice::Try::LAST_VAL > 1 ? :
167 0 0 if (not $self->{'use_cache'} || $opts->{'no_cache'} and -e $file and ref $self->{'_cache'} eq "ARRAY" and $self->{'_last_modified'} and [stat $file]->[9] > $self->{'_last_modified'})
174 0 0 wantarray ? :
176 0 1 unless -e $file
177 0 1 unless -r $file
186 0 1 if ($byte_order eq "\336\cR\cD\225") { }
1 0 elsif ($byte_order eq "\225\cD\cR\336") { }
202 0 1 if $rev_num > 0
234 1 0 if ($self->auto_decode or $opts->{'auto_decode'})
236 1 0 unless (my $enc = $self->encoding)
239 1 0 if ($hash->{''} =~ m[Content-Type:[[:blank:]\h]*text/plain;[[:blank:]\h]*charset[[:blank:]\h]*=[[:blank:]\h]*(?<quote>["'])?(?<encoding>[\w\-]+)\g{quote}?]is) { }
255 1 0 wantarray ? :
275 0 1 unless $self->_is_object($po) and $po->isa("Text::PO")
284 0 9 unless ($self->encode($this, $enc))
285 0 0 if warnings::enabled()
288 0 9 if ($this->{'msgid_plural'}) { }
300 1 8 $self->_is_array($this->{'msgstr'}) ? :
302 1 8 unless length $msgstr
305 0 8 if ($this->{'context'})
309 0 8 if ($this->{'msgid_plural'})
321 1 0 if (scalar @$metaKeys)
327 11 0 unless exists $meta->{$k2}
341 1 8 if $e->is_meta
357 0 1 exists $opts->{'file'} && length $opts->{'file'} ? :
358 0 1 if ($file eq '-') { }
365 0 1 length $opts->{'mode'} ? :
401 0 0 unless exists $opts->{'file'} and defined $opts->{'file'} and $opts->{'file'} eq "-"