Branch Coverage

blib/lib/Image/ExifTool/Canon.pm
Criterion Covered Total %
branch 128 242 52.8


line true false branch
10014 5 0 if (not $lens =~ /x$/ and $lens =~ /(\d+)/)
10018 0 5 if abs $shortFocal - $sf * $tc > "0.9"
10019 0 5 if $tc > 1
10039 12 42 unless $et->{'TAG_EXTRA'}{'FocalPlaneXResolution'} and $et->{'TAG_EXTRA'}{'FocalPlaneYResolution'}
10042 0 42 unless $xres and $yres
10049 28 0 if ($xres[0] % 1000 == 0 and $yres[0] % 1000 == 0 and $xres[0] >= 640000 and $yres[0] >= 480000 and $xres[0] < 10000000 and $yres[0] < 10000000 and $xres[1] >= 61 and $xres[1] < 1500 and $yres[1] >= 61 and $yres[1] < 1000 and $xres[1] != $yres[1])
10075 6 24 unless $lensType eq -1 or $lensType eq 65535
10076 6 24 if ($lens) { }
0 48 elsif ($lensModel and $lensModel =~ /\d/) { }
10078 5 1 unless $$printConv{"$lensType.1"}
10089 0 4 if $Image::ExifTool::userLens{$lens}
10092 0 1 if $lensModel =~ / \+ ((EXTENDER )?RF)?(\d+(\.\d*)?)x\b/
10096 1 3 unless $lens =~ m[(\d+)(?:-(\d+))?mm.*?(?:[fF]/?)(\d+(?:\.\d+)?)(?:-(\d+(?:\.\d+)?))?]
10100 0 3 if $sf and not $lf
10101 2 1 if $sa and not $la
10103 0 3 if ($lens =~ / \+ (\d+(\.\d+)?)x$/)
10107 2 1 if abs $shortFocal - $sf * $tc > "0.9"
10109 0 1 if ($lens =~ /^(.*) \+ (RF)?(\d+(\.\d*)?)x$/) { }
0 1 elsif ($tc > 1) { }
10110 0 0 unless $3 eq $tc
10113 0 0 if @maybe and $maybe[-1] =~ /^$lns/
10114 0 0 if @likely and $likely[-1] =~ /^$lns/
10115 0 0 if @matches and $matches[-1] =~ /^$lns/
10120 0 1 if abs $longFocal - $lf * $tc > "0.9"
10122 0 1 if ($maxAperture)
10125 0 0 if $maxAperture < $sa * $tc - "0.18"
10126 0 0 if $maxAperture > $la * $tc + "0.18"
10130 1 0 if @maybe
10132 0 1 if (@user)
10134 0 0 if (@user > 1)
10138 0 0 if $Image::ExifTool::userLens{$_}
10140 0 0 unless /^(.*) \+ \d+(\.\d+)?x$/
10141 0 0 if $Image::ExifTool::userLens{$1}
10143 0 0 if @good
10150 0 0 if (@matches > 1 and $lensModel and $lensModel =~ /(\| [ACS])/)
10154 0 0 if $lens =~ /\Q$type\E/
10156 0 0 if @best
10158 0 1 unless @matches
10159 0 1 unless @matches
10161 1 0 if @matches
10164 0 0 if ($printConv eq \%Image::ExifTool::Canon::canonLensTypes) { }
10172 24 0 if ($shortFocal)
10174 24 0 if $longFocal and $longFocal != $shortFocal
10178 24 0 if $lensType eq -1 or $lensType eq 65535
10204 369 0 if $val == $dataVal
10216 0 45 if $size < 24
10218 0 45 unless $af =~ /^(1|5|7|9|15|45|53)$/
10221 0 45 unless $h1 and $w1
10224 0 45 if abs $f1 - "1.33" < "0.01" or abs $f1 - "1.67" < "0.01"
10226 0 45 if abs $f1 - "0.75" < "0.01" or abs $f1 - "0.6" < "0.01"
10229 0 45 unless $h2 and $w2
10232 0 45 if $w1 eq $h1
10234 45 0 if abs 1 - $f1 / $f2 < "0.01"
10235 0 0 if abs 1 - $f1 * $f2 < "0.01"
10246 8 4 unless $offset
10248 0 4 unless defined($raf = $et->{'RAF'})
10252 4 0 if ($raf->Seek($offset, 0) and $raf->Read($buff, 8) == 8 and $buff =~ /^\xff{4}.\0\0/s)
10258 1 3 if ($version > 20)
10262 0 4 if ($version == 1 or $version == 2) { }
4 0 elsif ($version == 3) { }
10275 0 0 if ($raf->Read($buf2, 24) == 24)
10279 0 0 if ($count and $count < 20 and $raf->Read($buf2, $count * 32) == $count * 32)
10311 4 12 if $i == 3
10312 0 12 unless $raf->Read($buf2, 4) == 4
10316 4 8 if $i == 2 and $len >= 4
10318 0 12 unless $len <= 65536 and $raf->Read($buf2, $len) == $len
10325 4 0 unless ($err)
10326 0 4 if ($et->Options("HtmlDump"))
10355 5 41 if ($inv) { }
41 0 elsif ($val != 32767) { }
10357 0 5 if (not defined $rtnVal and &Image::ExifTool::IsInt($val))
10361 0 41 if ($val & 16384) { }
10377 44 27 unless $scale
10378 0 71 if ($short == $long) { }
10409 2 65 if $verbose
10417 63 797 unless my $tagInfo = $et->GetTagInfo($tagTablePtr, $index)
10420 260 537 if ($format) { }
10421 235 25 if ($format =~ /(.*)\[(.*)\]/) { }
0 25 elsif ($format eq 'string') { }
10427 0 235 if $@
10430 0 0 $size > $pos ? :
10436 0 797 if $pos + $len > $size
10438 0 797 unless defined $val
10439 22 775 if ($verbose)
10453 1 796 if ($tagInfo->{'SubDirectory'}) { }
751 45 elsif (not $tagInfo->{'Unknown'} or $unknown) { }
10464 748 3 if $count
10465 748 3 if ($key)
10466 0 748 if $et->{'OPTIONS'}{'SaveFormat'}
10467 0 748 if $et->{'OPTIONS'}{'SaveBin'}
10489 0 0 unless length $val == 8
10508 0 0 $row eq $lastRow ? :
10510 0 0 if $focus eq $focusPt
10511 0 0 if shift @bits
10513 0 0 $focus == 255 ? :
0 0 unless $focusing
10530 27 312 if ($val < 0) { }
10539 5 334 if ($frac == 12) { }
81 253 elsif ($frac == 20) { }
10556 81 352 if ($num < 0) { }
10564 2 431 if (abs $frac - 0.33 < 0.05) { }
57 374 elsif (abs $frac - 0.67 < 0.05) { }
10587 0 4 if ($et->Options('MakerNotes') || $et->{'REQ_TAG_LOOKUP'}{'makernotecanon'} and $dirInfo->{'DirLen'} > 8)
10618 0 16 if $len < 8 or $pos + $len > $dirEnd or not $tagTablePtr->{$tag}
10619 12 4 if $pos == $start
10658 0 28 if $size < 12
10659 0 28 if $pos + $size > $dirLen
10665 0 28 if $verbose > 2
10667 24 4 if ($tagTablePtr->{$type}) { }
0 4 elsif ($verbose) { }
10679 0 4 if $pos != $dirLen
10697 0 4 if $dirLen < 8
10699 0 4 if $verbose
10710 0 28 if $pos + 12 > $end
10715 0 28 if $nxt > $end
10716 0 28 if $verbose
10719 0 40 if $pos + 12 > $end
10723 0 40 if $pos + 4 * $count > $end
10735 0 4 if $err
10746 128 24 unless $et
10749 21 3 if (defined $dirData and length $dirData and $dirInfo->{'Fixup'})