Branch Coverage

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


line true false branch
9437 5 0 if (not $lens =~ /x$/ and $lens =~ /(\d+)/)
9441 0 5 if abs $shortFocal - $sf * $tc > "0.9"
9442 0 5 if $tc > 1
9460 43 12 if ($xres and $yres)
9467 27 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])
9494 6 22 unless $lensType eq -1 or $lensType eq 65535
9495 6 22 if ($lens) { }
0 44 elsif ($lensModel and $lensModel =~ /\d/) { }
9497 5 1 unless $$printConv{"$lensType.1"}
9508 0 4 if $Image::ExifTool::userLens{$lens}
9513 1 3 unless $lens =~ m[(\d+)(?:-(\d+))?mm.*?(?:[fF]/?)(\d+(?:\.\d+)?)(?:-(\d+(?:\.\d+)?))?]
9517 0 3 if $sf and not $lf
9518 2 1 if $sa and not $la
9520 0 3 if ($lens =~ / \+ (\d+(\.\d+)?)x$/)
9524 2 1 if abs $shortFocal - $sf * $tc > "0.9"
9526 0 1 if $tc > 1
9528 0 1 if abs $longFocal - $lf * $tc > "0.9"
9530 0 1 if ($maxAperture)
9533 0 0 if $maxAperture < $sa * $tc - "0.18"
9534 0 0 if $maxAperture > $la * $tc + "0.18"
9538 1 0 if @maybe
9540 0 1 if (@user)
9542 0 0 if (@user > 1)
9546 0 0 if $Image::ExifTool::userLens{$_}
9548 0 0 unless /^(.*) \+ \d+(\.\d+)?x$/
9549 0 0 if $Image::ExifTool::userLens{$1}
9551 0 0 if @good
9558 0 0 if (@matches > 1 and $lensModel and $lensModel =~ /(\| [ACS])/)
9562 0 0 if $lens =~ /\Q$type\E/
9564 0 0 if @best
9566 0 1 unless @matches
9567 0 1 unless @matches
9569 1 0 if @matches
9572 0 0 if ($printConv eq \%Image::ExifTool::Canon::canonLensTypes) { }
9580 22 0 if ($shortFocal)
9582 22 0 if $longFocal and $longFocal != $shortFocal
9586 22 0 if $lensType eq -1 or $lensType eq 65535
9612 349 0 if $val == $dataVal
9624 0 41 if $size < 24
9626 0 41 unless $af =~ /^(1|5|7|9|15|45|53)$/
9629 0 41 unless $h1 and $w1
9632 0 41 if abs $f1 - "1.33" < "0.01" or abs $f1 - "1.67" < "0.01"
9634 0 41 if abs $f1 - "0.75" < "0.01" or abs $f1 - "0.6" < "0.01"
9637 0 41 unless $h2 and $w2
9640 0 41 if $w1 eq $h1
9642 41 0 if abs 1 - $f1 / $f2 < "0.01"
9643 0 0 if abs 1 - $f1 * $f2 < "0.01"
9654 8 4 unless $offset
9656 0 4 unless defined($raf = $et->{'RAF'})
9660 4 0 if ($raf->Seek($offset, 0) and $raf->Read($buff, 8) == 8 and $buff =~ /^\xff{4}.\0\0/s)
9666 1 3 if ($version > 20)
9670 0 4 if ($version == 1 or $version == 2) { }
4 0 elsif ($version == 3) { }
9683 0 0 if ($raf->Read($buf2, 24) == 24)
9687 0 0 if ($count and $count < 20 and $raf->Read($buf2, $count * 32) == $count * 32)
9719 4 12 if $i == 3
9720 0 12 unless $raf->Read($buf2, 4) == 4
9724 4 8 if $i == 2 and $len >= 4
9726 0 12 unless $len <= 65536 and $raf->Read($buf2, $len) == $len
9733 4 0 unless ($err)
9734 0 4 if ($et->Options("HtmlDump"))
9763 5 39 if ($inv) { }
39 0 elsif ($val != 32767) { }
9765 0 5 if (not defined $rtnVal and &Image::ExifTool::IsInt($val))
9769 0 39 if ($val & 16384) { }
9785 39 25 unless $scale
9786 0 64 if ($short == $long) { }
9817 2 61 if $verbose
9825 59 753 unless my $tagInfo = $et->GetTagInfo($tagTablePtr, $index)
9828 248 505 if ($format) { }
9829 223 25 if ($format =~ /(.*)\[(.*)\]/) { }
0 25 elsif ($format eq 'string') { }
9835 0 223 if $@
9838 0 0 $size > $pos ? :
9844 0 753 if $pos + $len > $size
9846 0 753 unless defined $val
9847 22 731 if ($verbose)
9861 1 752 if ($tagInfo->{'SubDirectory'}) { }
707 45 elsif (not $tagInfo->{'Unknown'} or $unknown) { }
9872 704 3 if $count
9893 0 0 unless length $val == 8
9912 0 0 $row eq $lastRow ? :
9914 0 0 if $focus eq $focusPt
9915 0 0 if shift @bits
9917 0 0 $focus == 255 ? :
0 0 unless $focusing
9934 25 299 if ($val < 0) { }
9943 5 319 if ($frac == 12) { }
76 243 elsif ($frac == 20) { }
9960 81 352 if ($num < 0) { }
9968 2 431 if (abs $frac - 0.33 < 0.05) { }
57 374 elsif (abs $frac - 0.67 < 0.05) { }
9991 0 4 if ($et->Options('MakerNotes') || $et->{'REQ_TAG_LOOKUP'}{'makernotecanon'} and $dirInfo->{'DirLen'} > 8)
10022 0 16 if $len < 8 or $pos + $len > $dirEnd or not $tagTablePtr->{$tag}
10023 12 4 if $pos == $start
10062 0 28 if $size < 12
10063 0 28 if $pos + $size > $dirLen
10069 0 28 if $verbose > 2
10070 24 4 if ($tagTablePtr->{$type}) { }
0 4 elsif ($verbose) { }
10082 0 4 if $pos != $dirLen
10100 0 4 if $dirLen < 8
10102 0 4 if $verbose
10113 0 28 if $pos + 12 > $end
10118 0 28 if $nxt > $end
10119 0 28 if $verbose
10122 0 40 if $pos + 12 > $end
10126 0 40 if $pos + 4 * $count > $end
10138 0 4 if $err
10149 128 23 unless $et
10152 20 3 if (defined $dirData and length $dirData and $dirInfo->{'Fixup'})