Branch Coverage

blib/lib/Image/ExifTool/MXF.pm
Criterion Covered Total %
branch 128 202 63.3


line true false branch
2466 0 0 unless $val =~ /(\d{2,3})(\d{2})(\d{2})([$ne])/
2467 0 0 $4 eq 'N' || $4 eq 'E' ? :
2483 20 142 if ($type eq 'UTF-16') { }
3 139 elsif ($type eq 'ProductVersion') { }
2 137 elsif ($type eq 'VersionType') { }
13 124 elsif ($type eq 'Timestamp') { }
13 111 elsif ($type eq 'Position' or $type eq 'Length') { }
6 105 elsif ($type eq 'Boolean') { }
0 105 elsif ($type =~ /^(Alt|Lat|Lon)$/ and $len == 4) { }
20 85 elsif ($type =~ /(Array|Batch)/ and $len > 16) { }
6 79 elsif ($len == 32) { }
77 2 elsif ($len == 16) { }
2497 0 91 unless @max and $_ <= $max[0]
2500 0 13 if (@max) { }
2509 6 0 $val eq "\000" ? :
2513 0 0 if ($type eq 'Alt') { }
2515 0 0 unless $val =~ s/^[abc]..// or $val =~ s/^[def]../-/
2518 0 0 if ($type eq 'Lat') { }
2528 0 20 unless $len == 8 + $count * $size
2532 0 27 if $pos + $size > $len
2535 18 2 if ($type =~ /^StrongReference/) { }
2 0 elsif ($type eq 'BatchOfUL' or $type =~ /^WeakReference/) { }
2549 20 57 if ($type eq "UL" or $type eq "WeakReference")
2553 18 2 unless unpack("C", $val) & 128
2574 0 2 unless $end > 8
2577 0 2 unless $size >= 18
2584 0 100 if $pos + $size > $end
2591 100 0 unless $verbose
2593 0 0 if length $indx < 3
2622 0 216 if $pos + $len > $end
2625 216 0 if ($tag and $tagTablePtr->{$tag}) { }
2634 216 0 if ($tagInfo)
2636 160 0 if ($type and $knownType{$type})
2638 18 12 ref $val ? :
30 130 if $type =~ /^StrongReference/
2640 35 125 if ($tagInfo->{'Name'} eq 'InstanceUID') { }
0 230 elsif ($type eq 'UTF-16' and $textLang) { }
2644 17 18 if $mxfInfo->{$instance}
2653 0 125 if ($tagInfo and $tagInfo->{'Unknown'} and not defined $tagInfo->{'Binary'})
2666 97 119 unless $key
2671 0 119 unless $tagInfo
2673 19 100 if ($tagInfo->{'IsDuration'}) { }
0 100 elsif ($tagInfo->{'LanguageCode'}) { }
8 92 elsif ($name eq 'EditRate') { }
10 82 elsif ($name =~ /TrackID$/) { }
2681 2 8 unless ($mxfInfo->{'Group1'}{$trackID})
2689 35 0 if ($instance)
2691 17 18 if ($objInfo) { }
2703 10 25 if defined $trackID
2704 8 27 if $editRate
2705 0 35 if ($langCode) { }
2710 0 35 if ($langCode)
2715 0 0 unless $obj
2720 2 33 if $et->{'DIR_NAME'} eq "Preface"
2735 21 18 unless $objInfo and not $objInfo->{'DidGroups'}
2737 5 13 if defined $objInfo->{'TrackID'}
2740 11 7 if (defined $trackID)
2745 4 7 if defined $editRate
2747 2 9 if ($objInfo->{'Name'} eq "TimecodeComponent")
2748 1 1 $mxfInfo->{'InSource'} ? :
2754 1 17 if $name eq "SourcePackage"
2757 0 18 if ($pathInfo)
2766 87 32 if $g1
2767 0 119 if $g5
2773 0 18 if ($pathInfo)
2777 1 17 if $setSource
2794 4 19 unless my $tagInfo = $infoHash->{$key}
2795 0 19 unless $tagInfo->{'IsDuration'}
2796 0 19 unless my $g1 = $tagExtra->{$key}{'G1'}
2798 19 0 if $editRate
2816 0 2 unless $raf->Read($buff, 65547)
2817 1 1 unless $buff =~ /\x06\x0e\x2b\x34\x02\x05\x01\x01\x0d\x01\x02/g
2822 0 1 unless $raf->Seek($start, 0)
2843 2 44 if ($headerEnd and $pos >= $headerEnd)
2845 0 2 if $mxfInfo{'HeaderType'} eq "ClosedCompleteHeader" and not $verbose
2848 0 0 if ($footerPos and $footerPos > $pos and not $verbose && $unknown)
2850 0 0 unless $raf->Seek($footerPos, 0)
2855 1 45 unless $raf->Read($buff, 17) == 17
2859 45 0 if ($len >= 128) { }
2861 0 45 unless $raf->Read($buff, $n) == $n
2872 0 0 if (not $tagInfo and $ul =~ /^060e2b34\.0253\.0101\.(0d|0f)/ and $1 eq '0d' || $verbose || $unknown)
2876 0 0 $1 eq '0d' ? :
2881 38 7 if ($tagInfo and not $tagInfo->{'Unknown'} and $len < 10000000) { }
0 7 elsif ($tagInfo and !$tagInfo->{'Unknown'} || $unknown or $verbose) { }
2883 2 36 if ($tagInfo->{'Name'} eq 'Primer' and $mxfInfo{'HeaderSize'}) { }
1 35 elsif ($tagInfo->{'IsHeader'}) { }
2885 0 2 if $mxfInfo{'FooterPos'}
2892 0 38 unless $raf->Read($buff, $len) == $len
2895 0 0 if $type and $knownType{$type}
2897 0 0 if ($tagInfo) { }
2899 0 0 if ($tagInfo->{'Unknown'} and not defined $tagInfo->{'Binary'})
2913 0 0 $len < 65536 ? :
2914 0 0 unless $raf->Read($val, $n) == $n
2917 0 0 if $more
2919 0 7 unless $raf->Seek($len, 1)
2932 0 1 if $et->Options("SavePath")
2943 1 0 if ($mxfInfo{'BestDuration'})
2945 1 0 if $instance
2949 1 119 unless my $instance = $tagExtra->{$tag}{'UID'}
2953 53 66 if ($did{$utag}) { }
2957 1 65 if ($bestDur{$utag})