Branch Coverage

blib/lib/Log/Report/Lexicon/POT.pm
Criterion Covered Total %
branch 48 84 57.1


line true false branch
52 0 2 unless my $domain = $args->{'textdomain'}
55 2 0 unless ($forms)
66 2 0 defined $version ? :
78 0 3 if not $charset and $fn =~ m(\.([\w-]+)(?:\@[^/\\]+)?\.po$)i
82 2 1 if (defined $charset) { }
83 0 2 unless open $fh, "<:encoding($charset):crlf", $fn
87 0 1 unless open $fh, "<:raw:crlf", $fn
96 3 40 unless defined $block
101 0 40 unless length $block
103 1 39 unless ($charset)
104 1 0 $block =~ /\"content-type:.*?charset=["']?([\w-]+)/im ? :
110 0 1 unless $block = &decode($charset, $block)
115 40 0 if $po
118 0 3 unless close $fh
132 1 1 @_ % 2 ? :
135 0 2 unless defined $file
142 1 1 if (ref $file) { }
145 0 1 unless open $fh, $layers, $file
152 2 13 if $msgid eq ""
156 13 0 builtin::blessed($rec) ? :
159 0 13 if $po->useless
160 0 13 if $need_refs and not $po->references
166 0 2 unless $fh->close
178 0 0 $_[0]->filename =~ m([/\\](\w+)[^/\\]*$) ? :
184 13 37 unless my $msgs = $self->index->{$msgid}
186 37 0 if builtin::blessed($msgs) and !$msgctxt || $msgctxt eq $msgs->msgctxt
196 0 15 unless my $po = $self->msgid($msgid, $msgctxt)
210 53 0 unless $h
212 0 0 if builtin::blessed($h)
217 0 0 if $h->{$ctxt}
225 49 0 builtin::blessed($_) ? :
4 1 unless @_
227 0 1 if $_[0] ne "ACTIVE"
238 0 13 unless my $header = $self->msgid("")
241 8 5 unless (@_)
243 7 1 $text =~ /^\Q$field\E\:\s*([^\n]*?)\;?\s*$/im ? :
250 4 1 if (defined $content) { }
251 1 3 unless s/^\Q$field\E\:([^\n]*)/${field}: $content/im
292 2 0 if $header
315 0 0 if $po->msgid eq ""
317 0 0 if $po->fuzzy
318 0 0 unless $po->isActive or $po->useless