Condition Coverage

lib/Text/PO/Gettext.pm
Criterion Covered Total %
condition 46 114 40.3


and 3 conditions

line !l l&&!r l&&r condition
117 0 0 2 defined $self->{'path'} and length $self->{'path'}
130 0 0 0 defined $locale and length $locale
131 0 0 0 defined $key and length $key
161 10 0 4 defined $count and $count =~ /^\d+$/
165 6 1 7 exists $opts->{'locale'} and length $opts->{'locale'}
186 0 0 4 $self->_is_number($count) and int $plural->[0] > 0
325 20 0 18 exists $opts->{'locale'} and defined $opts->{'locale'}
454 0 0 2 defined $key and length $key
512 0 0 2 defined $v && length $v
618 0 0 2 $self->use_json and $path_json->exists
736 0 0 2 exists $def->{'currency'} and defined $def->{'currency'}
0 2 0 exists $def->{'currency'} and defined $def->{'currency'} and $def->{'currency'} eq "EUR"
737 0 0 2 exists $lconv->{'currency_symbol'} and defined $lconv->{'currency_symbol'}
0 2 0 exists $lconv->{'currency_symbol'} and defined $lconv->{'currency_symbol'} and $lconv->{'currency_symbol'} eq "EUR"
738 0 0 2 exists $lconv->{'grouping'} and defined $lconv->{'grouping'}
739 0 0 2 exists $lconv->{'mon_grouping'} and defined $lconv->{'mon_grouping'}

or 2 conditions

line l !l condition
319 38 0 $repo->get // {}
343 2 0 shift @_ || (return $self->error('Language provided, to get its dictionary, is undefined or null.'))
367 1 0 shift @_ || (return $self->error('No text provided to get its localised equivalent'))
368 1 0 $self->fetchLocale($key) || (return $self->pass_error)
382 1 0 shift @_ || (return $self->error('No text provided to get its localised equivalent'))
383 1 0 $self->fetchLocale($key) || (return $self->pass_error)
402 1 0 $hash->{'_po'} || (return $self->error('Unable to get the po object in the locale data hash'))
409 1 0 shift @_ || (return $self->error('No meta field provided to get its value.'))
411 1 0 $hash->{'_po'} || (return $self->error('Unable to get the po object in the locale data hash'))
446 1 0 $self->_get_po || (return $self->error('Unable to get the po object in the locale data hash'))
480 3 0 shift @_ || (return 0)
485 3 0 $repo->get // {}
608 2 0 shift @_ || (return $self->error('No domain was provided.'))
621 2 0 'Text::PO'->new('domain', $dom, 'use_json', 1, 'debug', $self->debug) || (return $self->pass_error('Text::PO'->error))
629 0 0 'Text::PO'->new('domain', $dom, 'debug', $self->debug) || (return $self->pass_error('Text::PO'->error))
637 0 0 'Text::PO::MO'->new($file, {'domain', $dom, 'debug', $self->debug}) || (return $self->pass_error('Text::PO::MO'->error))
639 0 0 $mo->as_object || (return $self->pass_error($po->error))
648 1 1 $repo->get // {}

or 3 conditions

line l !l&&r !l&&!r condition
110 0 0 2 $ENV{'LANG'} || $ENV{'LANGUAGE'}
163 0 10 0 $msgidPlural || $msgid
212 10 0 0 $dict->{'msgstr'} || $default
315 15 23 0 $opts->{'domain'} //= $self->domain
316 38 0 0 ref $self || $self
463 1 0 0 $self->locale || $self->currentLang
481 3 0 0 ref $self || $self
542 29 2 0 shift @_ || $self->locale
556 10 0 0 shift @_ || $self->locale
609 2 0 0 ref $self || $self