Branch Coverage

blib/lib/XML/TMX/Reader.pm
Criterion Covered Total %
branch 60 104 57.6


line true false branch
21 1 5 unless -f $file
35 0 5 if $enc
37 3 2 if ($line =~ /encoding=['"]([^'"]+)['"]/)
46 14 0 if ($enc =~ /utf.*8/i) { }
88 0 0 unless defined $opt
100 26 26 unless /^-/
111 5 7 unless ref $orig eq "ARRAY"
112 8 4 unless ref $new eq "ARRAY"
121 0 5 if $orig and ref $orig ne "HASH"
122 0 5 if $new and ref $new ne "HASH"
133 0 4 if (exists $conf->{'-note'})
136 0 4 if (exists $conf->{'-prop'})
147 6 3 if ref $_[0] eq "HASH"
150 0 9 unless ref $code eq "CODE"
163 87 219 if ($va->[0] eq '-prop') { }
101 118 elsif ($va->[0] eq '-note') { }
175 0 33 if (not $outputingTMX and $ans and ref $ans eq "HASH")
178 0 0 if ($conf->{'-header'})
184 20 39 if ($ans and ref $ans eq "HASH")
186 0 20 if $v and ref $v eq "HASH"
189 0 20 if $conf->{'n'}
197 18 136 if ($v->[0] eq '-prop') { }
18 118 elsif ($v->[0] eq '-note') { }
0 118 elsif ($v->[0] eq '-cdata') { }
213 0 118 $XML::TMX::Reader::v{'iscdata'} ? :
217 0 0 $self->{'ignore_markup'} ? :
218 0 0 $self->{'ignore_markup'} ? :
232 12 75 if /^\s*$/
233 9 66 if /
236 9 0 if (/(.*?)()(.*)/s)
242 3 6 if defined $conf->{'output'}
243 4 5 if (defined $conf->{'-output'})
246 4 0 if ($conf->{'-header'})
255 0 9 if $conf->{'verbose'}
256 0 9 if $conf->{'-verbose'}
258 9 59 if $resto
259 8 60 if m[]
261 0 60 if $conf->{'-verbose'} and not $i % 10
262 1 59 if defined $conf->{'proc_tu'} and $i > $conf->{'proc_tu'}
263 0 59 if defined $conf->{'gen_tu'} and $gen > $conf->{'gen_tu'}
266 0 59 if (defined $conf->{'patt'})
267 0 0 if (ref $conf->{'patt'}) { }
272 0 0 if (m[lang=["']${li}['"](.*?)]is)
275 0 0 unless $ok
278 0 0 unless /$conf->{'patt'}/
287 0 59 if ($conf->{'-raw'}) { }
289 0 0 if ($conf->{'-output'})
290 0 0 if $conf->{'n'}
295 0 59 if $@
298 0 9 if $conf->{'-verbose'}
302 4 5 if $conf->{'-header'} and $outputingTMX
315 0 0 if (defined $langs->{$_}) { }