Branch Coverage

blib/lib/Image/ExifTool/FlashPix.pm
Criterion Covered Total %
branch 184 398 46.2


line true false branch
1340 0 0 if $val
1357 0 1 if $dirEnd < 4
1364 0 18 unless defined $value
1371 1 2 if length $vals[$i + 5]
1392 46 264 if ($flags)
1393 46 0 if ($flags == 4096) { }
1396 0 46 if ($valPos + $size > $dirEnd)
1401 0 46 if $count == 0
1409 101 209 unless ($format =~ /^VT_/)
1411 0 101 if ($valPos + $size > $dirEnd)
1423 0 216 if ($valPos + $size > $dirEnd)
1428 2 33 if ($noPad and defined $len and $len & 3)
1430 2 0 if ($valPos + $pad + $size <= $dirEnd)
1432 0 2 if substr($$dataPt, $valPos, $pad) eq "\0" x $pad
1436 24 192 if ($format eq 'VT_VARIANT') { }
50 142 elsif ($format eq 'VT_FILETIME') { }
0 142 elsif ($format eq 'VT_DATE') { }
117 25 elsif ($format =~ /STR$/) { }
2 23 elsif ($format eq 'VT_BLOB' or $format eq 'VT_CF') { }
23 0 elsif ($format eq 'VT_CLSID') { }
1440 0 24 unless defined $val
1448 49 1 if ($val > 365 * $secDay)
1454 0 49 if ($val < 0 or $val > $sec100yr)
1458 0 0 if ($v2 > 0 and $v2 < $sec100yr) { }
0 0 elsif ($val < 0 and $val + $unixTimeZero > 0) { }
1470 0 0 if $val != 0
1474 98 19 if $format eq "VT_LPWSTR"
1475 0 117 if ($valPos + $len + 4 > $dirEnd)
1480 98 19 if ($format eq 'VT_LPWSTR') { }
19 0 elsif ($codePage) { }
1485 19 0 if ($charset) { }
0 0 elsif ($codePage == 1200) { }
1495 29 88 $noPad ? :
1498 0 2 if ($valPos + $len + 4 > $dirEnd)
1513 0 209 if @vals > 1 and not wantarray
1518 268 42 if (wantarray) { }
0 42 elsif (@vals > 1) { }
1544 0 0 if $$dataPt =~ /^..\0+\xff\xff\x01\0\x0d\0CDocumentPage/s
1548 0 0 if ($$dataPt =~ /<\0\?\0x\0p\0a\0c\0k\0e\0t\0 \0b\0e\0g\0i\0n\0=\0['"](\0\xff\xfe|\xfe\xff)/g)
1550 0 0 if ($$dataPt =~ /<\0\?\0x\0p\0a\0c\0k\0e\0t\0 \0e\0n\0d\0=\0['"]\0[wr]\0['"]\0\?\0>\0?/g)
1555 0 0 if $et->{'FILE_TYPE'} ne "FLA" and $et->{'VALUE'}{'Format'} and $et->{'VALUE'}{'Format'} eq "application/vnd.adobe.fla"
1558 0 0 if $isFLA
1569 0 0 unless my $dataPt = $dirInfo->{'DataPt'}
1572 0 0 unless ($dirLen > 2 and &Get16u($dataPt, 0) == 42476)
1579 0 0 if $pos + 2 > $dirLen
1582 0 0 if $pos + 2 > $dirLen
1585 0 0 if $pos + 2 > $dirLen
1588 0 0 if $pos + $n * 8 > $dirLen
1593 0 0 if $off + 8 > $n * 8
1625 0 1 $i ? :
1627 1 0 unless defined $offsets
1629 0 0 if $extra->{$key}
1630 0 0 unless $doc
1634 0 0 $j ? :
1635 0 0 unless defined $value->{$key}
1637 0 0 if $extra->{$key}
1638 0 0 unless $tmp
1639 0 0 if ($tmp eq $doc)
1644 0 0 unless defined $docFlags
1645 0 0 $docFlags & 512 ? :
1648 0 0 $j ? :
1649 0 0 unless defined $value->{$key}
1651 0 0 if $extra->{$key}
1652 0 0 unless $tmp
1653 0 0 if ($tmp eq $doc)
1658 0 0 unless defined $docTable
1663 0 0 unless @$offsets
1666 0 0 unless $len and $off + $len <= length $$docTable
1678 0 3 $i ? :
1679 3 0 unless defined $value->{$key}
1699 0 0 if $pos + $len * 2 > $end
1717 0 0 if $pos + 6 > $end
1722 0 0 if $pos + 2 > $end
1725 0 0 if $pos + $len * 2 > $end
1728 0 0 if $pos + 2 > $end
1731 0 0 if $pos + $len * 2 > $end
1748 2 23 if $bom == 65534
1749 0 23 unless $bom == 65279
1768 0 25 if ($dirLen < 48)
1773 0 25 unless (&CheckBOM($dataPt, $pos))
1779 0 25 if ($pos < 48)
1786 0 26 if $pos + 8 > $dirEnd
1789 0 26 unless $size
1791 0 26 if $verbose
1792 0 26 if ($pos + 8 + 8 * $numEntries > $dirEnd)
1802 0 269 if $valStart >= $dirEnd
1805 1 268 if ($tag == 0)
1809 0 6 if $valPos + 8 > $dirEnd
1813 0 6 if $valPos > $dirEnd
1816 0 6 unless length $name
1818 2 4 if $tagTablePtr->{$name}
1822 0 4 unless length $name
1823 0 4 if $verbose
1830 6 262 if (defined $dictionary{$tag})
1835 0 268 unless @vals
1836 4 264 @vals > 1 ? :
1840 46 222 if $flags
1844 26 242 if (not $custom and $tag == 1 || $tag == 2147483648) { }
56 186 elsif ($tagTablePtr->{$tag}) { }
184 4 elsif ($tagTablePtr->{'VARS'} and not $custom) { }
1848 26 0 if ($tag == 1)
1849 0 26 if $val < 0
1859 184 96 if ($masked->{$mask}{$tag & $mask})
1876 0 26 if $index < $numEntries
1877 24 2 unless $dirInfo->{'Multi'}
1890 0 6 unless $raf
1894 6 33 if $sect >= 4294967294
1895 0 33 if $loadedSect{$sect}
1898 0 33 unless $offset <= 2147483647 || $raf->{'LargeFileSupport'} and $raf->Seek($offset, 0) and $raf->Read($buff, $sectSize) == $sectSize
1903 0 33 if $sect * 4 > length($$fatPt) - 4
1921 0 67 if ($dirLen < 13)
1929 21 46 if ($type == 1) { }
46 0 elsif ($type == 2) { }
0 0 elsif ($type != 3) { }
1931 0 21 if $vers != 0
1932 0 21 if ($et->{'FPXR'})
1938 0 21 if $verbose
1942 0 48 if ($pos + 4 > $dirLen)
1951 0 48 unless ($$dataPt =~ m[\G(/\0(..)*?)\0\0]gs)
1957 0 48 if ($verbose)
1958 0 0 $size == 4294967295 ? :
1965 2 46 if ($size == 4294967295)
1966 0 2 unless ($$dataPt =~ /(.{16})/gs)
1975 25 23 unless ($tagTablePtr->{$name})
1979 23 2 if $name =~ /(.*) \d{6}$/s and $tagTablePtr->{$1} or $name =~ /(.*)_[0-9a-f]{16}$/s and $tagTablePtr->{$1}
2001 46 0 if ($fpxr and $fpxr->[$index]) { }
0 0 elsif ($index == 512 and $dirLen > 60 and $et->{'FujiPreview'} || $dirLen > 64 && substr($$dataPt, $dirStart + 60, 4) eq "\377\330\377\333") { }
2004 46 0 if (not defined $obj->{'Stream'}) { }
2012 0 0 if ($overlap < 0 or $dirLen - $overlap < 13) { }
2024 46 0 if ($len >= $obj->{'Size'})
2025 0 46 if $verbose
2026 0 46 if ($len > $obj->{'Size'})
2041 0 0 unless defined $et->{'FujiPreview'}
2046 0 0 if $index != 255
2056 21 46 if ($dirInfo->{'LastFPXR'})
2057 21 0 if ($et->{'FPXR'})
2060 48 0 unless defined $obj->{'Stream'} and length $obj->{'Stream'}
2069 0 21 if ($et->{'FujiPreview'})
2084 0 5 unless my $obj = $hier->{$index}
2085 0 5 if exists $obj->{'DocNum'}
2087 2 3 if $obj->{'Left'}
2088 1 4 if $obj->{'Right'}
2089 1 4 if (defined $obj->{'Child'})
2090 1 0 unless $used
2092 0 1 if $doc
2095 0 1 if ($meta) { }
0 1 elsif (@subDoc) { }
2118 0 1 unless $raf->Read($buff, 512) == 512
2120 0 1 unless $buff =~ /^\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1/
2124 0 1 unless $fileType and $fpxFileType{$fileType}
2126 0 1 substr($buff, 28, 2) eq "\377\376" ? :
2142 0 1 if ($verbose)
2157 0 1 $sectSize > 512 ? :
2163 108 1 if $sect == 4294967295
2166 0 1 unless ($raf->Seek($offset, 0) and $raf->Read($fatSect, $sectSize) == $sectSize)
2175 1 0 if $difStart >= 4294967294
2177 0 0 if (++$difCountCheck > $difCount)
2181 0 0 if ($loadedDifSect{$difStart})
2186 0 0 unless ($raf->Seek($offset, 0) and $raf->Read($buff, $sectSize) == $sectSize)
2197 0 1 if ($fatCountCheck != $fatCount)
2205 0 1 unless (defined $miniFat and defined $dir)
2209 0 1 if ($verbose)
2220 0 1 if ($verbose)
2234 3 5 if $type == 0
2235 0 5 if ($type > 5)
2243 3 2 if $len > 32
2251 1 4 unless ($miniStream)
2253 0 1 unless (defined $miniStreamBuff)
2261 3 2 if ($tagTablePtr->{$tag}) { }
2268 0 0 if $tag =~ /(.*) \d{6}$/s and $tagTablePtr->{$1} or $tag =~ /(.*)_[0-9a-f]{16}$/s and $tagTablePtr->{$1} or $tag =~ /(.*)_[0-9]{4}$/s and $tagTablePtr->{$1}
2277 4 1 unless $obj = $hier{$index}
2278 2 3 unless $lSib == 4294967295
2279 1 4 unless $rSib == 4294967295
2280 1 4 unless ($chld == 4294967295)
2282 1 0 unless $sub = $hier{$chld}
2286 2 3 unless $tagInfo or $verbose
2291 3 0 if ($typeStr eq 'STREAM') { }
0 0 elsif ($typeStr eq 'ROOT') { }
2292 0 3 if ($size >= $miniCutoff) { }
3 0 elsif ($size) { }
2301 0 3 unless (defined $buff)
2302 0 0 $tagInfo ? :
2313 0 3 if ($verbose)
2317 0 0 unless $lSib == 4294967295
2318 0 0 unless $rSib == 4294967295
2319 0 0 unless $chld == 4294967295
2328 3 0 if ($tagInfo and $buff)
2331 2 1 if ($subdir) { }
2349 1 0 unless ($et->{'DOC_NUM'})
2357 11 39 unless defined $num and $objIndex{$num}
2358 0 39 unless my $obj = $hier{$objIndex{$num}}
2360 39 0 unless $docNums and @$docNums
2362 0 0 unless $tag =~ / /
2368 0 0 unless defined $et->{'VALUE'}{$key}
2370 0 0 if $extra and $extra->{'G3'}
2381 0 1 if $verbose
2383 0 1 if ($et->{'VALUE'}{'FileType'} eq "FPX")
2385 0 0 if ($val)
2389 0 0 unless $val =~ /$pat/