Branch Coverage

blib/lib/Locale/Maketext/Gettext.pm
Criterion Covered Total %
branch 93 124 75.0


line true false branch
39 0 52 if ref $self eq ''
42 48 4 if (@_ > 1)
43 19 29 if (defined $_) { }
52 23 29 exists $self->{'ENCODING'} ? :
62 0 29 if ref $self eq ''
65 29 0 if (@_ > 1)
66 2 27 if (defined $_) { }
74 2 27 exists $self->{'KEY_ENCODING'} ? :
108 43 112 unless defined ${"${class}::MO_FILE";}
114 0 155 if $self->{'LOCALE'} eq 'i_default'
129 0 71 if ref $self eq ''
133 1 1 unless defined $LOCALEDIR or exists do { $$self{'LOCALEDIRS'} }->{$DOMAIN}
136 69 1 if defined $LOCALEDIR
149 0 82 if ref $self eq ''
154 4 78 unless defined $DOMAIN
170 4 74 if (not exists do { $$self{'LOCALEDIRS'} }->{$DOMAIN}) { }
175 1 12 if (-f $_ and -r $_)
181 3 1 unless defined $mo_file
195 51 24 unless ($self->_is_using_cache($mo_file))
201 46 5 if (scalar keys %_ > 0)
204 46 0 if ($_{''} =~ m[^Content-Type: text/plain; charset=(.*)$]im) { }
216 48 3 if (@stats > 0) { }
230 70 5 if (defined $CACHE{$mo_file}{'encoding'}) { }
236 70 5 unless (exists $self->{'USERSET_ENCODING'})
237 65 5 if (exists $self->{'MO_ENCODING'}) { }
257 50 25 unless exists $CACHE{$mo_file}
261 0 25 if (not defined $CACHE{$mo_file}{'mtime'} && defined $CACHE{$mo_file}{'size'}) { }
282 0 194 if ref $self eq ''
287 2 192 if ($self->{'REREAD_MO'} < $REREAD_MO)
289 2 0 if defined($_ = $self->textdomain)
299 16 178 if (${"${class}::MO_FILE";} ne $self->{'MO_FILE'})
307 92 102 if exists $self->{'KEY_ENCODING'} and not &Encode::is_utf8($key)
311 74 111 if (exists $self->{'ENCODING'}) { }
7 120 elsif (scalar keys %{$$self{'Lexicon'};} == 0 and exists $self->{'KEY_ENCODING'} and not &Encode::is_utf8($key)) { }
329 0 9 if ref $self eq ''
342 3 49 unless -f $mo_file and -r $mo_file
345 0 49 unless open $FH, $mo_file
347 0 49 unless defined($_ = read($FH, $content, $len))
349 0 49 unless close $FH
354 44 5 if ($_ eq "\336\cR\cD\225") { }
3 2 elsif ($_ eq "\225\cD\cR\336") { }
367 0 47 if $_ > 0
420 0 2 if ref $self eq ''
423 2 0 if (@_ > 1)
424 2 0 if (defined $_) { }
426 0 2 if $self->{'DIE_FOR_LOOKUP_FAILURES'}
429 0 0 if $self->{'DIE_FOR_LOOKUP_FAILURES'}
434 2 0 exists $self->{'USERSET_FAIL'} ? :
445 0 41 if ref $self eq ''
448 41 0 if (@_ > 1)
449 4 37 if ($_) { }
451 3 1 if (exists $self->{'USERSET_FAIL'}) { }
464 41 0 exists $self->{'DIE_FOR_LOOKUP_FAILURES'} ? :
475 0 2 if ref $self eq ''
478 2 0 if @_ > 1
481 2 0 if exists $self->{'ENCODE_FAILURE'}
494 0 69 if ref $self eq ''
501 27 42 unless exists $self->{'failure_lex'}
503 36 33 unless exists do { $$self{'failure_lex'} }->{$key}
507 61 8 if ref $_ eq 'SCALAR'
508 0 8 unless ref $_ eq 'CODE'
520 0 8 unless (defined $r)