Branch Coverage

blib/lib/Translate/Fluent/ResourceGroup.pm
Criterion Covered Total %
branch 37 64 57.8


line true false branch
27 0 2 if ($context->{'default_language'})
30 0 2 if ($context->{'fallback_order'})
40 0 14 unless ref $self
44 0 14 unless (open my $fh, $fname)
50 0 14 unless $fluent
52 12 2 if (my($ctx) = $fluent =~ / \A\#\s*context:\s*([^\n]+)\n /x)
57 12 0 if (not scalar @fcontext % 2) { }
69 12 2 if ($resset)
73 0 14 if defined wantarray
81 2 0 unless ref $self
86 0 4 if $context->{$k}
91 2 0 unless substr($directory, -1) eq '/'
93 0 2 unless opendir my $dh, $directory
102 0 2 if ($recursive)
103 0 0 if not /\A\./
135 0 13 if ($reset) { }
152 0 7 if not $context and $variables->{'__context'}
155 0 15 if (ref $context eq 'Translate::Fluent::ResourceGroup::Context')
162 2 13 unless $res and $res->isa('Translate::Fluent::Elements::Message')
177 1 11 unless $term->isa('Translate::Fluent::Elements::Term')
187 0 3 unless $res->isa('Translate::Fluent::Elements::Message')
213 31 39 if (my $rset = $self->sets->{$key})
214 29 2 if $res = $rset->resources->{$res_id}
217 41 0 $fbnext eq 'language' ? :
218 1 40 if ($ctx{$fbnext} eq $fbnext_default) { }
221 1 0 unless $fbnext{$fbnext}
223 0 0 $context->{$fbnext} || $fbnext eq 'language' ? :
231 0 0 $fbnext eq 'language' ? :
237 40 0 $fbnext eq 'language' ? :
250 40 0 if $lang
256 13 27 unless ($lang eq $default_lang)
260 40 0 unless $default_lang eq 'dev'