Branch Coverage

blib/lib/XML/TMX/Writer.pm
Criterion Covered Total %
branch 33 62 53.2


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