Condition Coverage

lib/Text/PO.pm
Criterion Covered Total %
condition 68 387 17.5


and 2 conditions

line l !l condition
219 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
222 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
263 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
266 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
619 1 2 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
622 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
812 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
815 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
848 2 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
851 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
934 2 0 $self->{'plural'} and scalar @{$self->{'plural'};}

and 3 conditions

line !l l&&!r l&&r condition
98 0 0 0 scalar @_ == 1 and ref $_[0] eq "HASH"
188 7 0 1 $e->plural and $e->msgid_plural
214 1 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
219 1 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
222 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 1 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
1 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 0 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
258 0 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
263 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
266 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' 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 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 0 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
310 11 0 0 not exists $self->{'meta'}{$k2} and length $Text::PO::DEF_META->{$k}
348 1 0 0 $opts->{'msgid_only'} and $e->msgid eq $elem->msgid
0 0 1 $e->msgid eq $elem->msgid and $e->msgstr eq $elem->msgstr
475 0 0 9 not $opts->{'encoding'} and $self->encoding
522 2 0 0 $ignoring_leading_blanks and /^[[:blank:]\h]*$/
560 125 0 3 not $foundFirstLine and /^\S/
569 6 15 0 scalar @$elem > 1 and not length $e->msgid
21 0 0 scalar @$elem > 1 and not length $e->msgid and length $e->msgstr
15 0 0 scalar @$elem > 1 and not length $e->msgid and length $e->msgstr and length $elem->[-1]->msgid
0 0 0 scalar @$elem > 1 and not length $e->msgid and length $e->msgstr and length $elem->[-1]->msgid and not length $elem->[-1]->msgstr
615 3 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
619 3 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
622 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
2 1 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' 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 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
2 1 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
658 0 0 0 not $self->meta->length and $c =~ /^domain[[:blank:]\h]+\"(.*?)\"/
733 0 1 2 $elem->[-1] ne $e and length $e->msgid
1 0 2 $elem->[-1] ne $e and length $e->msgid and ++$$seen{$e->msgid} < 2
762 0 0 2 defined $s and length $s
783 0 0 2 $attribute =~ /^[a-zA-Z][a-zA-Z0-9\_\-]+$/ and length $attribute <= 255
785 0 0 2 $value =~ /^[a-zA-Z][a-zA-Z0-9\_\-]+$/ and length $value <= 255
799 0 0 0 $self->{'use_json'} and -e "$this.json" || $this =~ /\.json$/
808 0 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
812 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
815 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' 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 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 0 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
835 0 0 2 $self->{'use_json'} and -e "$this.json" || $this =~ /\.json$/
844 2 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
848 2 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
851 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 2 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' 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 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 2 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
853 0 2 0 length $ref->{'domain'} and not length $self->domain
1008 0 0 0 scalar @_ and @_ % 2 || !(@_ % 2) && ref $_[1] eq 'HASH'
1020 0 0 0 -e $file and -w $file
1147 0 0 0 ref $v and $self->_is_a($v, "DateTime")
1162 0 0 4 defined $meta and length $meta
1228 0 0 0 defined $self->{'original'} and length $self->{'original'}
1231 0 0 0 defined $self->{'value'} and length $self->{'value'}
1241 0 0 0 $self->{'params'} and ref $self->{'params'} eq "HASH"
1287 0 0 0 length $str > 0 and not $str =~ /^$Text::PO::HeaderValue::TEXT_REGEXP$/

or 2 conditions

line l !l condition
106 0 0 $opt->{'msgid'} || (return $self->error('No msgid was provided'))
112 0 0 $opt->{'msgid'} || (return $self->error('No msgid was provided'))
285 1 0 $self->encoding || 'utf8'
339 1 0 shift @_ || (return $self->error('No element to check existence was provided.'))
342 0 1 $opts->{'msgid_only'} //= 0
483 46 0 shift @_ || (return '')
496 3 0 shift @_ || (return $self->error('No file or glob was provided to parse po file.'))
508 3 0 'IO::File'->new("<$this") || (return $self->error(qq[Unable to open po file "$this" in read mode: $!]))
743 4 0 $self->_parse_timestamp($str) || (return $self->error(qq[Date time string provided is unsupported: "$str".]))
797 0 0 shift @_ || (return $self->error('No file or glob was provided to parse po file.'))
802 0 0 'IO::File'->new("$file") || (return $self->error(qq[Unable to open json po file "$file" in read mode: $!]))
833 2 0 shift @_ || (return $self->error('No file or glob was provided to parse po file.'))
838 2 0 'IO::File'->new($file) || (return $self->error(qq[Unable to open json po file "$file" in read mode: $!]))
1021 0 0 'IO::File'->new(">$file") || (return $self->error(qq[Unable to open file "$file" in write mode: $!]))
1046 0 0 'IO::File'->new("+<$this") || (return $self->error("Unable to open file '${this}' in read/write mode: $!"))
1054 0 0 'IO::File'->new(">$this") || (return $self->error("Unable to write to file '${this}': $!"))
1143 4 0 shift @_ || (return $self->error('No field was provided to get its DateTime object equivalent.'))
1173 21 0 shift @_ || (return $self->error('No field was provided to get its DateTime object equivalent.'))
1267 2 0 shift @_ || (return $self->error('No parameter name was provided.'))

or 3 conditions

line l !l&&r !l&&!r condition
165 0 0 8 $e->is_meta or not length $e->msgid
222 1 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
1 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 1 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 0 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
247 0 0 2 exists $ENV{'LANGUAGE'} or exists $ENV{'LANG'}
248 0 0 0 $ENV{'LANGUAGE'} || $ENV{'LANG'}
0 0 0 $ENV{'LANGUAGE'} || $ENV{'LANG'}
266 0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 0 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
321 0 0 8 $e->is_meta or not length $e->msgid
348 0 1 0 $opts->{'msgid_only'} and $e->msgid eq $elem->msgid or $e->msgid eq $elem->msgid and $e->msgstr eq $elem->msgstr
622 1 0 2 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 1 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 1 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
799 0 0 0 -e "$this.json" || $this =~ /\.json$/
815 0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 0 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
835 0 2 0 -e "$this.json" || $this =~ /\.json$/
851 2 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 2 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 2 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
1008 0 0 0 @_ % 2 || !(@_ % 2) && ref $_[1] eq 'HASH'
1010 0 0 0 $opts->{'handle'} || $opts->{'file'}