Branch Coverage

blib/lib/XML/TMX/Writer.pm
Criterion Covered Total %
branch 39 62 62.9


line true false branch
19 5 0 unless exists $ops{'-encoding'} and not $ops{'-encoding'} =~ /utf.?8/i
36 5 0 if (defined $options{'-output'})
38 0 5 unless open $self->{'OUTPUT'}, ">", $options{'-output'}
42 5 0 if ($encoding =~ /utf.?8/i)
48 0 5 if (defined $options{'SEGTYPE'} and grep {$_ eq $options{'SEGTYPE'};} @valid_segtype) { }
61 0 5 if defined $options{'srcencoding'}
62 1 4 if defined $options{'id'}
67 5 0 if defined $options{'-prop'}
68 5 0 if defined $options{'-note'}
77 0 33 unless ref $props eq "HASH"
79 24 26 if (ref $props->{$key} eq 'ARRAY') { }
81 0 31 if ($key eq '_') { }
90 0 26 if ($key eq '_') { }
103 0 33 unless ref $notes eq "ARRAY"
122 0 21 if (exists $tuv{'-raw'})
130 41 127 if (exists $tuv{$key})
135 0 21 if (defined $tuv{'srcencoding'})
139 0 21 if defined $tuv{'-verbatim'}
140 20 1 if exists $tuv{'-verbatim'}
142 21 0 if (defined $tuv{'-prop'})
146 21 0 if (defined $tuv{'-note'})
150 0 21 if (defined $tuv{'-n'})
164 41 1 if (ref $tuv{$lang} eq "HASH")
165 0 41 if defined $tuv{$lang}{'-iscdata'}
166 0 41 if exists $tuv{$lang}{'-iscdata'}
168 7 34 if exists $tuv{$lang}{'-prop'}
169 7 34 if exists $tuv{$lang}{'-note'}
173 0 42 if ($verbatim) { }
0 42 elsif ($cdata) { }
212 130 129 if %attributes
225 0 181 unless defined $text