Branch Coverage

blib/lib/Image/ExifTool/Trailer.pm
Criterion Covered Total %
branch 21 88 23.8


line true false branch
85 19 26 unless $dirInfo->{'ScanForTrailer'}
87 0 26 unless my $pos = $et->{'TrailerStart'}
89 0 26 unless $raf->Seek($pos, 0)
90 0 26 unless $len > 0 and $len < 10000000 and $raf->Read($buff, $len) == $len and $buff =~ /\xff{4}\x1b\*9HWfu\x84\x93\xa2\xb1$/ and $buff =~ /(streamdata|vivo\{")/g
94 26 0 if ($start)
103 7 19 if $dirInfo->{'OutFile'}
105 0 19 if $et->{'OPTIONS'}{'Verbose'} or $et->{'HTML_DUMP'}
108 0 19 if ($buff =~ /^streamdata\xff\xd8\xff/ and $buff =~ /\xff\xd9stream(info|coun)/g)
112 19 0 if ($buff =~ /vivo\{"/g)
114 19 0 if ($buff =~ /\}\0/g)
137 0 0 unless $dirInfo->{'ScanForTrailer'}
140 0 0 if $dirInfo->{'OutFile'}
142 0 0 unless my $start = $et->{'TrailerStart'}
143 0 0 unless $raf->Seek(-8 - $dirInfo->{'Offset'}, 2) and $raf->Read($buff, 8) == 8
149 0 0 if ($buff =~ /^jxrs...\0$/)
152 0 0 if ($jlen < $end - $start and $jlen > 8 and $raf->Seek($end - $jlen) and $raf->Read($buff, $jlen - 8) == $jlen - 8)
158 0 0 if (ref $list eq 'ARRAY') { }
161 0 0 if ($dump and $trailLen)
172 0 0 unless $off and $name and $len
173 0 0 if ($raf->Seek($end - $jlen - $off) and $raf->Read($buf2, $len) == $len)
203 0 2 unless (ref $tag eq "ARRAY" and ref $mime eq "ARRAY")
207 0 0 unless (ref $mime eq "ARRAY" and ref $tag eq "ARRAY")
213 1 1 unless $dirInfo->{'ScanForTrailer'}
217 0 1 if $dirInfo->{'OutFile'}
220 1 0 unless ref $len eq "ARRAY"
223 0 1 unless my $start = $et->{'TrailerStart'}
233 1 0 if $more < 16
234 0 0 unless $len->[$i] and defined $tag->[$i]
235 0 0 if $len->[$i] > $more
236 0 0 unless $raf->Seek($start + $pos) and $raf->Read($buff, 16) == 16 and $raf->Seek($start + $pos)
237 0 0 if ($mime->[$i] eq 'image/jpeg') { }
0 0 elsif ($mime->[$i] eq 'video/mp4') { }
245 0 0 if ($buff =~ /^$regex/s) { }
246 0 0 unless $raf->Read($buff, $len->[$i]) == $len->[$i]
248 0 0 if $pos
249 0 0 unless $raf->Read($buff, $more) == $more
250 0 0 unless $buff =~ /($regex)/gs
253 0 0 if $len->[$i] > $end - $start - $pos
256 0 0 unless ($$tagTable{$tag->[$i]})
260 0 0 if ($mime->[$i] eq 'image/jpeg') { }
268 0 0 if $dump
276 0 0 $pad && $pad->[$i] ? :
278 1 0 if (defined $tag->[$i] and defined $mime->[$i])
281 1 0 unless $pos