Branch Coverage

blib/lib/Image/ExifTool/Charset.pm
Criterion Covered Total %
branch 59 134 44.0


line true false branch
102 22 127 unless ($conv)
106 22 0 if (%$module or eval "require $module")
124 0 0 if ($hiBits == 64512) { }
0 0 elsif ($surrogate) { }
126 0 0 if $_ == 65535 or $_ == 65534 or $_ >= 64976 and $_ <= 65007
128 0 0 if $hiBits != 56320
131 0 0 if $hiBits == 56320
132 0 0 if $hiBits == 55296
135 0 0 unless defined $surrogate
136 0 0 unless $surrogate
157 51 725 if ($type & 1) { }
60 665 elsif ($type == 256) { }
159 0 51 unless ($conv)
161 0 0 if $et
166 0 60 if ($] < 5.006001) { }
174 0 60 $] < 5.01 ? :
176 0 0 if ($Image::ExifTool::evalWarning and $et and not $et->{'WarnBadUTF8'})
183 45 671 if ($type & 256) { }
665 6 elsif ($type & 1536) { }
186 83 776 if defined $conv->{$_}
191 410 255 if (not $byteOrder) { }
0 255 elsif ($byteOrder eq 'Unknown') { }
197 230 435 $byteOrder eq 'MM' ? :
198 0 665 if ($type & 1024) { }
0 665 elsif ($val =~ s/^(\xfe\xff|\xff\xfe)//) { }
201 0 0 $1 eq "\000\000\376\377" ? :
0 0 if $val =~ s/^(\0\0\xfe\xff|\xff\xfe\0\0)//
204 0 0 $1 eq "\376\377" ? :
210 665 0 if (not $conv) { }
0 0 elsif ($unknown) { }
212 0 665 if ($unknown)
219 0 0 unless $_ & 65280
220 0 0 unless $_ & 255
227 0 0 if ($bh > $bl or $bh == $bl and $zl > $zh)
235 0 665 if ($charset eq "UTF16")
238 0 0 unless ($uni[$i] & 64512) == 55296 and ($uni[$i + 1] & 64512) == 56320
248 0 0 if defined $conv->{$_}
252 0 0 if ($e1)
253 0 0 $byteOrder eq 'MM' ? :
257 0 0 if defined $conv->{$_}
261 0 0 if ($e2 < $e1)
269 0 0 if defined $conv->{$_}
279 0 22 unless $cv
281 10 12 unless ref $cv
283 0 12 if ref $cv eq "ARRAY"
286 12 0 if (defined $ch) { }
287 12 0 if ($cv->{$ch}) { }
289 12 0 unless ref $cv
316 23 776 unless $charset
318 667 132 if ($csType == 256)
319 667 0 if ($] >= 5.006001) { }
330 98 34 if ($csType & 2049)
332 0 98 unless ($conv)
333 0 0 if $et
338 2 96 unless ($inv)
339 0 2 if (not $csType or $csType & 2050)
340 0 0 if $et
351 98 34 if ($csType & 256) { }
354 2021 450 if $_ < 128
355 58 392 if $inv->{$_}
359 7 385 if $_ < 256 and not $conv->{$_}
361 3 382 if ($et and not $et->{'EncodingError'})
371 0 34 if ($inv)
375 0 34 if ($charset eq "UTF16")
378 0 0 unless $uni->[$i] >= 65536 and $uni->[$i] < 1114111
388 32 2 $byteOrder eq 'MM' ? :
389 0 34 if $csType & 1024