Branch Coverage

blib/lib/Image/ExifTool/Canon.pm
Criterion Covered Total %
branch 121 222 54.5


line true false branch
9475 5 0 if (not $lens =~ /x$/ and $lens =~ /(\d+)/)
9479 0 5 if abs $shortFocal - $sf * $tc > "0.9"
9480 0 5 if $tc > 1
9498 48 12 if ($xres and $yres)
9505 33 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])
9532 6 24 unless $lensType eq -1 or $lensType eq 65535
9533 6 24 if ($lens) { }
0 48 elsif ($lensModel and $lensModel =~ /\d/) { }
9535 5 1 unless $$printConv{"$lensType.1"}
9546 0 4 if $Image::ExifTool::userLens{$lens}
9551 1 3 unless $lens =~ m[(\d+)(?:-(\d+))?mm.*?(?:[fF]/?)(\d+(?:\.\d+)?)(?:-(\d+(?:\.\d+)?))?]
9555 0 3 if $sf and not $lf
9556 2 1 if $sa and not $la
9558 0 3 if ($lens =~ / \+ (\d+(\.\d+)?)x$/)
9562 2 1 if abs $shortFocal - $sf * $tc > "0.9"
9564 0 1 if $tc > 1
9566 0 1 if abs $longFocal - $lf * $tc > "0.9"
9568 0 1 if ($maxAperture)
9571 0 0 if $maxAperture < $sa * $tc - "0.18"
9572 0 0 if $maxAperture > $la * $tc + "0.18"
9576 1 0 if @maybe
9578 0 1 if (@user)
9580 0 0 if (@user > 1)
9584 0 0 if $Image::ExifTool::userLens{$_}
9586 0 0 unless /^(.*) \+ \d+(\.\d+)?x$/
9587 0 0 if $Image::ExifTool::userLens{$1}
9589 0 0 if @good
9596 0 0 if (@matches > 1 and $lensModel and $lensModel =~ /(\| [ACS])/)
9600 0 0 if $lens =~ /\Q$type\E/
9602 0 0 if @best
9604 0 1 unless @matches
9605 0 1 unless @matches
9607 1 0 if @matches
9610 0 0 if ($printConv eq \%Image::ExifTool::Canon::canonLensTypes) { }
9618 24 0 if ($shortFocal)
9620 24 0 if $longFocal and $longFocal != $shortFocal
9624 24 0 if $lensType eq -1 or $lensType eq 65535
9650 369 0 if $val == $dataVal
9662 0 45 if $size < 24
9664 0 45 unless $af =~ /^(1|5|7|9|15|45|53)$/
9667 0 45 unless $h1 and $w1
9670 0 45 if abs $f1 - "1.33" < "0.01" or abs $f1 - "1.67" < "0.01"
9672 0 45 if abs $f1 - "0.75" < "0.01" or abs $f1 - "0.6" < "0.01"
9675 0 45 unless $h2 and $w2
9678 0 45 if $w1 eq $h1
9680 45 0 if abs 1 - $f1 / $f2 < "0.01"
9681 0 0 if abs 1 - $f1 * $f2 < "0.01"
9692 8 4 unless $offset
9694 0 4 unless defined($raf = $et->{'RAF'})
9698 4 0 if ($raf->Seek($offset, 0) and $raf->Read($buff, 8) == 8 and $buff =~ /^\xff{4}.\0\0/s)
9704 1 3 if ($version > 20)
9708 0 4 if ($version == 1 or $version == 2) { }
4 0 elsif ($version == 3) { }
9721 0 0 if ($raf->Read($buf2, 24) == 24)
9725 0 0 if ($count and $count < 20 and $raf->Read($buf2, $count * 32) == $count * 32)
9757 4 12 if $i == 3
9758 0 12 unless $raf->Read($buf2, 4) == 4
9762 4 8 if $i == 2 and $len >= 4
9764 0 12 unless $len <= 65536 and $raf->Read($buf2, $len) == $len
9771 4 0 unless ($err)
9772 0 4 if ($et->Options("HtmlDump"))
9801 5 41 if ($inv) { }
41 0 elsif ($val != 32767) { }
9803 0 5 if (not defined $rtnVal and &Image::ExifTool::IsInt($val))
9807 0 41 if ($val & 16384) { }
9823 44 27 unless $scale
9824 0 71 if ($short == $long) { }
9855 2 65 if $verbose
9863 63 797 unless my $tagInfo = $et->GetTagInfo($tagTablePtr, $index)
9866 260 537 if ($format) { }
9867 235 25 if ($format =~ /(.*)\[(.*)\]/) { }
0 25 elsif ($format eq 'string') { }
9873 0 235 if $@
9876 0 0 $size > $pos ? :
9882 0 797 if $pos + $len > $size
9884 0 797 unless defined $val
9885 22 775 if ($verbose)
9899 1 796 if ($tagInfo->{'SubDirectory'}) { }
751 45 elsif (not $tagInfo->{'Unknown'} or $unknown) { }
9910 748 3 if $count
9931 0 0 unless length $val == 8
9950 0 0 $row eq $lastRow ? :
9952 0 0 if $focus eq $focusPt
9953 0 0 if shift @bits
9955 0 0 $focus == 255 ? :
0 0 unless $focusing
9972 27 310 if ($val < 0) { }
9981 5 332 if ($frac == 12) { }
81 251 elsif ($frac == 20) { }
9998 81 352 if ($num < 0) { }
10006 2 431 if (abs $frac - 0.33 < 0.05) { }
57 374 elsif (abs $frac - 0.67 < 0.05) { }
10029 0 4 if ($et->Options('MakerNotes') || $et->{'REQ_TAG_LOOKUP'}{'makernotecanon'} and $dirInfo->{'DirLen'} > 8)
10060 0 16 if $len < 8 or $pos + $len > $dirEnd or not $tagTablePtr->{$tag}
10061 12 4 if $pos == $start
10100 0 28 if $size < 12
10101 0 28 if $pos + $size > $dirLen
10107 0 28 if $verbose > 2
10108 24 4 if ($tagTablePtr->{$type}) { }
0 4 elsif ($verbose) { }
10120 0 4 if $pos != $dirLen
10138 0 4 if $dirLen < 8
10140 0 4 if $verbose
10151 0 28 if $pos + 12 > $end
10156 0 28 if $nxt > $end
10157 0 28 if $verbose
10160 0 40 if $pos + 12 > $end
10164 0 40 if $pos + 4 * $count > $end
10176 0 4 if $err
10187 128 24 unless $et
10190 21 3 if (defined $dirData and length $dirData and $dirInfo->{'Fixup'})