Branch Coverage

blib/lib/Locale/Babelfish.pm
Criterion Covered Total %
branch 42 78 53.8


line true false branch
73 0 3 if scalar @_ == 0
92 0 0 unless $self->{'watch'}
96 0 0 if (not defined $mtime && defined $new_mtime or $new_mtime != $mtime)
101 0 0 if $ok
110 0 22 unless $dictname_key
112 0 22 if $dictname_key =~ /\P{ASCII}/
114 0 22 $custom_locale ? :
118 19 3 if (defined $r) { }
119 11 8 if (ref $r eq 'SCALAR')
129 0 3 if (exists $self->{'fallback_cache'}{$locale}{$dictname_key}) { }
136 1 1 if (defined $r)
137 1 0 if (ref $r eq 'SCALAR')
149 17 5 if (ref $r eq 'CODE')
152 16 1 if (defined $params)
154 3 13 if (ref $params eq '') { }
182 0 1 if $dictname_key =~ /\P{ASCII}/
184 0 1 $custom_locale ? :
186 1 0 if $self->{'dictionaries'}{$locale}{$dictname_key}
190 0 0 defined $self->{'fallback_cache'}{$locale}{$dictname_key} ? :
0 0 if exists $self->{'fallback_cache'}{$locale}{$dictname_key}
194 0 0 if defined $self->{'dictionaries'}{$_}{$dictname_key}
210 6 8 unless -f $file
216 0 8 unless $cur_suffix eq $self->suffix
219 0 8 if $tmp[-1] eq 'tt'
220 0 8 if ($tmp[-1] eq 'js')
225 0 0 if -f 'File::Spec'->catpath($volume, $directories, join('.', @tmp) . ".tt.$lang.$cur_suffix")
229 6 2 if ($subdir =~ m[\A\Q$fdir\E[\\/](.+)\z])
250 8 0 unless $self->watch
258 0 21 unless defined $phrase
271 15 6 if ($self->phrase_need_compilation($value, $key))
284 3 1 if $self->dictionaries->{$locale}
286 0 1 if @alt_locales > 1
290 1 0 if ($alt_locale and $self->dictionaries->{$alt_locale})
296 0 1 if exists $self->fallback_cache->{$alt_locale}
299 1 0 if exists $self->fallbacks->{$alt_locale}
303 0 0 if $self->dictionaries->{$self->{'default_locale'}}
310 0 1 unless scalar @fallback_locales
314 0 1 if scalar @fallback_locales == 1 and ref $fallback_locales[0] eq 'ARRAY'
329 8 38 if (ref $value eq 'HASH') { }