Branch Coverage

blib/lib/Image/ExifTool/Nikon.pm
Criterion Covered Total %
branch 59 232 25.4


line true false branch
11362 0 0 if $pos + $size > $dirEnd
11385 0 0 unless $dat[$i]
11387 0 0 unless $dat[$i] & 1 << $j
11389 0 0 if defined $point
11392 0 0 unless @points
11395 0 0 if length $a == length $b
11396 0 0 if length $a == 2
11411 0 8 if (@points)
11415 0 0 unless my $bitNum = $bitNum{uc $point}
11430 0 0 if ($inv) { }
11431 0 0 unless $val =~ /^([A-J])(\d+)$/i
11452 0 0 unless $dat[$i]
11454 0 0 unless $dat[$i] & 1 << $j
11456 0 0 if defined $point
11459 0 0 unless @points
11474 0 0 unless defined $n
11476 0 0 if $byte > $size
11490 0 0 if $col == $center
11491 0 0 if $col < $center
11492 0 0 if $col > $center
11503 0 0 if $row == $center
11504 0 0 if $row < $center
11505 0 0 if $row > $center
11517 0 0 if $val == 0
11518 0 0 if $val == 127
11519 0 0 if $val == -128
11521 0 0 if $val == -127
11533 55 59 if $val =~ /^[-+]?\d+(\.\d+)?$/
11534 0 59 if $val =~ m[n/a]i
11535 3 56 if $val =~ /auto/i
11536 0 56 if $val =~ /user/i
11546 0 0 if $inv
11548 0 0 if ($$conv{"$val.1"})
11551 0 0 unless my $lens = $$conv{"$val.$i"}
11552 0 0 if ($Image::ExifTool::userLens{$lens}) { }
11558 0 0 if @user
11568 0 0 if (@ids)
11572 0 0 if @good
11576 0 0 if @good
11580 0 0 if @good
11594 0 153 if (length $str > 60) { }
11599 97 56 if ($str =~ /[AEIOUY]/)
11602 50 47 if ($str =~ s/\b([AEIOUY])([A-Z]+)/$1\L$2\E/g)
11608 46 51 if ($str =~ s/\b([A-Z])([A-Z]*[AEIOUY][A-Z]*)/$1\L$2\E/g)
11663 1 3 unless $start
11665 1 3 if not defined $len or $len > $maxLen
11666 0 4 if $len <= 0
11681 3 1 $start ? :
11682 2 2 $end < length $$dataPt ? :
11694 26 0 if not defined $serial or $serial =~ /^\d+$/
11695 0 0 if $et->{'Model'} =~ /\bD50$/
11708 0 0 $dirInfo ? :
11711 0 0 unless $raf->Seek(-20 - $offset, 2) and $raf->Read($buff, 20) == 20 and substr($buff, -16) eq "\0\0\0\0\0\0/NIKON APP"
11717 0 0 if $trailerLen > $fileEnd
11718 0 0 if ($dirInfo)
11719 0 0 if $dirInfo
11721 0 0 if ($dirInfo->{'OutFile'})
11722 0 0 if ($et->{'DEL_GROUP'}{'NikonApp'}) { }
0 0 elsif ($trailerLen > $fileEnd or not $raf->Seek($dirInfo->{'DataPos'}, 0) or $raf->Read(${$$dirInfo{'OutFile'};}, $trailerLen) != $trailerLen) { }
11733 0 0 if $verbose or $et->{'HTML_DUMP'}
11735 0 0 unless ($trailerLen >= 64 and $raf->Seek($fileEnd - $trailerLen, 0) and $raf->Read($buff, 64) == 64 and $buff =~ /NIKON APP\0/)
11744 0 0 if ($len & 2147483648)
11748 0 0 if $id == 0 and $len == 0
11749 0 0 unless ($raf->Read($buff, $len) == $len)
11753 0 0 if ($id == 1) { }
11787 0 0 unless ($fmtStr)
11788 0 0 if $pass
11792 0 0 if ($pos + $size > $end)
11793 0 0 if $pass
11796 0 0 if ($pass) { }
0 0 elsif (exists $needTags{$tag}) { }
11807 0 0 if $rational and $key
11826 204 3 unless $et
11829 0 3 unless (defined $serial and defined $count and $serial =~ /^\d+$/ and $count =~ /^\d+$/)
11830 0 0 if (defined $serial or defined $count)
11832 0 0 if (defined $serial and defined $count) { }
11833 0 0 $serial =~ /^\d+$/ ? :
11835 0 0 defined $serial ? :
11843 0 3 $dirInfo->{'IsWriting'} ? :
11851 0 3 if ($dirInfo->{'IsWriting'})
11852 0 0 if ($et->{'NewNikonSerialKey'})
11856 0 0 if ($et->{'NewNikonCountKey'})
11861 3 0 if ($tagInfo and $tagInfo->{'SubDirectory'})
11864 3 0 if ($verbose < 3 and $et->Options("Unknown") < 2 and not $recrypt)
11871 0 3 unless $start
11872 1 2 if (defined $offset) { }
11880 1 2 unless ($len and $len < $maxLen)
11889 1 2 if $byteOrder
11891 0 3 if ($more)
11894 0 0 if $moreLen > $maxLen
11896 0 0 if ($len < $moreLen)
11902 0 3 if ($verbose > 2)
11920 0 3 if ($dirInfo->{'IsWriting'}) { }
11924 0 0 if ($recrypt)
11925 0 0 if defined $newSerial
11926 0 0 if defined $newCount
11929 0 0 if ($changed == $et->{'CHANGED'}) { }
11933 0 0 if $offset
11960 19 0 if ($dirStart >= 0 and $dirStart <= $dataLen - 2)
11963 0 19 if $dirStart + 2 + 12 * $numEntries > $dataLen
11966 0 19 unless ($numEntries)
11967 0 0 unless $raf
11969 0 0 unless $raf->Seek($dataPos + $base, 0) and $raf->Read($data, 2) == 2
11972 0 0 unless $raf->Read($buff, $len) == $len
11983 499 8 unless exists $tagHash->{$tagID}
11985 0 8 if $format < 1 or $format > 13
11990 1 7 if ($size > 4)
11991 0 1 if $size > 16777216
11996 0 1 if ($valuePtr < 0 or $valuePtr + $size > $dataLen)
11997 0 0 unless $raf and $raf->Seek($base + $valuePtr + $dataPos, 0) and $raf->Read($buff, $size) == $size
12031 0 2 unless $dirLen > 2
12033 0 2 unless $count and $count * 12 + 2 <= $dirLen
12034 0 2 if ($et->Options("Verbose"))
12042 6 0 if $et->HandleTag($tagTablePtr, $tagID, $value, "Index", $index, "DataPt", $dataPt, "Start", $pos, "Size", 12)
12060 299 19 unless $et
12070 7 12 if ($dirInfo->{'IsWriting'}) { }