Condition Coverage

lib/Text/PO/Gettext.pm
Criterion Covered Total %
condition 39 99 39.3


and 3 conditions

line !l l&&!r l&&r condition
58 0 0 2 defined $self->{'path'} and length $self->{'path'}
71 0 0 0 defined $locale and length $locale
72 0 0 0 defined $key and length $key
102 10 0 4 defined $count and $count =~ /^\d+$/
106 6 1 7 exists $opts->{'locale'} and length $opts->{'locale'}
127 0 0 4 $self->_is_number($count) and int $plural->[0] > 0
257 20 0 18 exists $opts->{'locale'} and defined $opts->{'locale'}
386 0 0 2 defined $key and length $key
441 0 0 2 defined $v && length $v
541 0 0 2 $self->use_json and $path_json->exists
654 0 2 0 exists $def->{'currency'} and defined $def->{'currency'}
2 0 0 exists $def->{'currency'} and defined $def->{'currency'} and $def->{'currency'} eq "EUR"
655 2 0 0 exists $lconv->{'currency_symbol'} and defined $lconv->{'currency_symbol'}
2 0 0 exists $lconv->{'currency_symbol'} and defined $lconv->{'currency_symbol'} and $lconv->{'currency_symbol'} eq "EUR"
656 2 0 0 exists $lconv->{'grouping'} and defined $lconv->{'grouping'}
657 2 0 0 exists $lconv->{'mon_grouping'} and defined $lconv->{'mon_grouping'}

or 2 conditions

line l !l condition
275 2 0 shift @_ || (return $self->error('Language provided, to get its dictionary, is undefined or null.'))
299 1 0 shift @_ || (return $self->error('No text provided to get its localised equivalent'))
300 1 0 $self->fetchLocale($key) || (return $self->pass_error)
314 1 0 shift @_ || (return $self->error('No text provided to get its localised equivalent'))
315 1 0 $self->fetchLocale($key) || (return $self->pass_error)
334 1 0 $hash->{'_po'} || (return $self->error('Unable to get the po object in the locale data hash'))
341 1 0 shift @_ || (return $self->error('No meta field provided to get its value.'))
343 1 0 $hash->{'_po'} || (return $self->error('Unable to get the po object in the locale data hash'))
378 1 0 $self->_get_po || (return $self->error('Unable to get the po object in the locale data hash'))
412 3 0 shift @_ || (return 0)
531 2 0 shift @_ || (return $self->error('No domain was provided.'))
544 2 0 'Text::PO'->new('domain', $dom, 'use_json', 1, 'debug', $self->debug) || (return $self->pass_error('Text::PO'->error))
552 0 0 'Text::PO'->new('domain', $dom, 'debug', $self->debug) || (return $self->pass_error('Text::PO'->error))
560 0 0 'Text::PO::MO'->new($file, {'domain', $dom, 'debug', $self->debug}) || (return $self->pass_error('Text::PO::MO'->error))
562 0 0 $mo->as_object || (return $self->pass_error($po->error))

or 3 conditions

line l !l&&r !l&&!r condition
51 0 0 2 $ENV{'LANG'} || $ENV{'LANGUAGE'}
104 0 10 0 $msgidPlural || $msgid
146 10 0 0 $dict->{'msgstr'} || $default
249 15 23 0 $opts->{'domain'} //= $self->domain
395 1 0 0 $self->locale || $self->currentLang
467 29 2 0 shift @_ || $self->locale
480 10 0 0 shift @_ || $self->locale