Branch Coverage

blib/lib/Image/ExifTool/Nikon.pm
Criterion Covered Total %
branch 79 318 24.8


line true false branch
13289 0 0 if $pos + $size > $dirEnd
13312 0 0 unless $dat[$i]
13314 0 0 unless $dat[$i] & 1 << $j
13315 0 0 ref $afPoints eq 'HASH' ? :
13316 0 0 if defined $point
13319 0 0 unless @points
13322 0 0 if length $a == length $b
13323 0 0 if length $a == 2
13336 16 0 ref $afPoints eq 'HASH' ? :
13338 0 16 if (@points)
13340 0 0 if (ref $afPoints eq 'HASH') { }
13346 0 0 unless my $bitNum = $bitNum{uc $point}
13361 0 0 if ($inv) { }
13362 0 0 unless $val =~ /^([A-J])(\d+)$/i
13383 0 0 unless $dat[$i]
13385 0 0 unless $dat[$i] & 1 << $j
13387 0 0 if defined $point
13390 0 0 unless @points
13405 0 0 unless defined $n
13407 0 0 if $byte > $size
13421 0 0 if $col == 0
13422 0 0 if $col == $center
13423 0 0 if $col < $center
13424 0 0 if $col > $center
13435 0 0 if $row == 0
13436 0 0 if $row == $center
13437 0 0 if $row < $center
13438 0 0 if $row > $center
13450 0 0 if $val == 0
13451 0 0 if $val == 127
13452 0 0 if $val == -128
13454 0 0 if $val == -127
13466 55 59 if $val =~ /^[-+]?\d+(\.\d+)?$/
13467 0 59 if $val =~ m[n/a]i
13468 3 56 if $val =~ /auto/i
13469 0 56 if $val =~ /user/i
13479 0 0 if $inv
13481 0 0 if ($$conv{"$val.1"})
13484 0 0 unless my $lens = $$conv{"$val.$i"}
13485 0 0 if ($Image::ExifTool::userLens{$lens}) { }
13491 0 0 if @user
13501 0 0 if (@ids)
13505 0 0 if @good
13509 0 0 if @good
13513 0 0 if @good
13528 0 159 if (length $str > $lim and $lim >= 5) { }
13533 103 56 if ($str =~ /[AEIOUY]/)
13536 56 47 if ($str =~ s/\b([AEIOUY])([A-Z]+)/$1\L$2\E/g)
13542 46 57 if ($str =~ s/\b([A-Z])([A-Z]*[AEIOUY][A-Z]*)/$1\L$2\E/g)
13606 1 4 unless $start
13608 1 4 if not defined $len or $len > $maxLen
13609 4 1 if (defined $serial and defined $count)
13618 1 4 if (defined $decryptStart) { }
13627 1 4 if $len <= 0
13645 32 0 if not defined $serial or $serial =~ /^\d+$/
13646 0 0 if $et->{'Model'} =~ /\bD50$/
13659 0 0 $dirInfo ? :
13662 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"
13668 0 0 if $trailerLen > $fileEnd
13669 0 0 if ($dirInfo)
13672 0 0 if ($dirInfo->{'OutFile'})
13673 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) { }
13684 0 0 if $verbose or $et->{'HTML_DUMP'}
13686 0 0 unless ($trailerLen >= 64 and $raf->Seek($fileEnd - $trailerLen, 0) and $raf->Read($buff, 64) == 64 and $buff =~ /NIKON APP\0/)
13695 0 0 if ($len & 2147483648)
13699 0 0 if $id == 0 and $len == 0
13700 0 0 unless ($raf->Read($buff, $len) == $len)
13704 0 0 if ($id == 1) { }
13738 0 0 unless ($fmtStr)
13739 0 0 if $pass
13743 0 0 if ($pos + $size > $end)
13744 0 0 if $pass
13747 0 0 if ($pass) { }
0 0 elsif (exists $needTags{$tag}) { }
13758 0 0 if ($key)
13759 0 0 if $rational
13760 0 0 if $et->{'OPTIONS'}{'SaveBin'}
13781 0 3 if ref $tagInfo eq "ARRAY"
13783 0 0 if $ignoreSubdir and $tagInfo->{'SubDirectory'}
13785 1 2 $fmt =~ s/\[(\d+)\]$// ? :
13786 0 3 unless my $sz = &Image::ExifTool::FormatSize($fmt)
13803 3 0 unless $vars
13804 0 3 if ($vars->{'NIKON_OFFSETS'} and not $vars->{'NIKON_INITIALIZED'})
13809 0 0 unless ref $tagInfo eq "HASH"
13810 0 0 unless my $subdir = $tagInfo->{'SubDirectory'}
13820 3 0 unless ($tagInfo->{'NikonInitialized'})
13826 1 2 if (defined $off) { }
13833 3 0 if (@tagIDs) { }
13836 0 3 if ref $lastInfo eq "ARRAY"
13837 1 2 if $first + $off > $start
13839 3 0 if (defined $subdir->{'KnownEnd'}) { }
13860 0 0 if $offset + 4 > $dataLen or $offset < $start
13867 0 0 if $offset + 4 + $more > $dataLen
13875 0 0 unless my $off = &Get32u($dataPt, $pos)
13878 0 0 if ($tagInfo) { }
0 0 elsif ($unknown > 1) { }
13879 0 0 if ref $tagInfo ne "HASH" or not $tagInfo->{'Unknown'}
13884 0 0 unless (%$tbl)
13900 0 0 unless $Image::ExifTool::Nikon::a->[1] <=> $Image::ExifTool::Nikon::b->[1]
13907 0 0 if $tagInfo and not ref $tagInfo eq 'HASH' && $tagInfo->{'AlwaysDecrypt'}
13910 0 0 if ref $tagInfo eq "HASH" and defined($subdir = $tagInfo->{'SubDirectory'})
13911 0 0 if ($decryptMode) { }
0 0 elsif ($tagInfo and ref $tagInfo ne 'HASH' || !$tagInfo->{'Unknown'}) { }
13913 0 0 if $sorted[$i][2]
13917 0 0 if ($subdir and $subdir->{'KnownEnd'})
13919 0 0 if ($n > $len)
13920 0 0 unless $tagInfo->{'AlwaysDecrypt'}
13927 0 0 if ($decryptMode)
13929 0 0 if $decryptMode == 2 or not $end or $end < $dpos
13942 119 3 unless $et
13945 0 3 unless (defined $serial and defined $count and $serial =~ /^\d+$/ and $count =~ /^\d+$/)
13946 0 0 if (defined $serial or defined $count)
13948 0 0 if (defined $serial and defined $count) { }
13949 0 0 $serial =~ /^\d+$/ ? :
13951 0 0 defined $serial ? :
13961 0 3 $isWriting ? :
13969 0 3 if ($isWriting)
13970 0 0 if ($et->{'NewNikonSerialKey'})
13974 0 0 if ($et->{'NewNikonCountKey'})
13979 3 0 if ($tagInfo and $tagInfo->{'SubDirectory'}) { }
13986 1 2 defined $subdir->{'DirOffset'} ? :
13988 1 2 if $subdir->{'ByteOrder'}
13992 0 0 $recrypt ? :
0 3 $unknown ? :
0 3 $isWriting ? :
13993 0 3 if ($tagTablePtr->{'VARS'}{'NIKON_OFFSETS'}) { }
3 0 elsif ($dMode < 2) { }
13997 1 2 if ($dMode == 0 and $subdir->{'KnownStart'})
14006 3 0 if $subdir->{'KnownEnd'}
14013 0 3 unless $len and $len < $maxLen
14015 3 0 unless $didDecrypt
14017 0 3 if ($verbose > 2)
14035 0 3 if ($isWriting) { }
14039 0 0 if ($recrypt)
14040 0 0 if defined $newSerial
14041 0 0 if defined $newCount
14044 0 0 if ($changed == $et->{'CHANGED'}) { }
14048 0 0 if $offset
14076 24 0 if ($dirStart >= 0 and $dirStart <= $dataLen - 2)
14079 0 24 if $dirStart + 2 + 12 * $numEntries > $dataLen
14082 0 24 unless ($numEntries)
14083 0 0 unless $raf
14085 0 0 unless $raf->Seek($dataPos + $base, 0) and $raf->Read($data, 2) == 2
14088 0 0 unless $raf->Read($buff, $len) == $len
14099 589 8 unless exists $tagHash->{$tagID}
14101 0 8 if $format < 1 or $format > 13
14106 1 7 if ($size > 4)
14107 0 1 if $size > 16777216
14112 0 1 if ($valuePtr < 0 or $valuePtr + $size > $dataLen)
14113 0 0 unless $raf and $raf->Seek($base + $valuePtr + $dataPos, 0) and $raf->Read($buff, $size) == $size
14147 0 2 unless $dirLen > 2
14149 0 2 unless $count and $count * 12 + 2 <= $dirLen
14150 0 2 if ($et->Options("Verbose"))
14158 6 0 if $et->HandleTag($tagTablePtr, $tagID, $value, "Index", $index, "DataPt", $dataPt, "Start", $pos, "Size", 12)
14177 0 0 unless $raf->Read($buff, 53) == 53
14179 0 0 unless $raf->Read($buff, $len) == $len
14194 302 24 unless $et
14204 8 16 if ($dirInfo->{'IsWriting'}) { }