Branch Coverage

blib/lib/Image/ExifTool/PLIST.pm
Criterion Covered Total %
branch 102 166 61.4


line true false branch
158 0 37 unless @$props
163 0 37 if ($verbose > 1)
171 2 35 if ($prop eq 'data') { }
2 33 elsif ($prop eq 'date') { }
1 32 elsif ($prop eq 'true' or $prop eq 'false') { }
172 0 2 if ($val =~ /^[0-9a-f]+$/ and not length $val & 1) { }
187 17 15 if ($prop eq "key")
188 15 2 if (@$props <= 3) { }
200 2 18 unless @$keys
204 15 3 unless ($tagInfo)
205 0 15 if $verbose
213 2 13 if ($prop eq "date")
220 14 4 if ($et->{'LastPListTag'} and $et->{'LastPListTag'} ne $tagInfo)
225 0 18 if $plistType{$tag} and $et->{'FILE_TYPE'} eq "XMP"
228 0 1 if ($tagInfo->{'CompressedPLIST'} and ref $val eq "SCALAR" and not $$val =~ /^bplist00/)
229 0 0 if (eval { do { require IO::Uncompress::RawInflate } }) { }
231 0 0 if (IO::Uncompress::RawInflate::rawinflate($val, \$inflated)) { }
266 0 81 unless $raf->Read($buff, 1) == 1
269 1 80 if ($type == 0) { }
23 57 elsif ($type == 1 or $type == 2 or $type == 3) { }
0 57 elsif ($type == 8) { }
273 18 5 $type == 1 ? :
0 23 unless my $proc = $type == 1 ? $readProc{$size} : $readProc{$size + 256}
274 23 0 if $raf->Read($buff, $size) == $size
275 3 20 if ($type == 3 and defined $val)
282 0 0 unless $raf->Read($buff, $size) == $size
284 0 0 if ($proc) { }
0 0 elsif ($size == 16) { }
294 5 52 if ($size == 15)
297 0 5 unless defined $size and $size =~ /^\d+$/
299 2 55 if ($type == 4) { }
40 15 elsif ($type == 5) { }
1 14 elsif ($type == 6) { }
14 0 elsif ($type == 10 or $type == 12 or $type == 13) { }
300 2 0 if ($size < 1000000 or $et->Options('Binary')) { }
301 0 2 unless $raf->Read($buff, $size) == $size
307 0 40 unless $raf->Read($val, $size) == $size
310 0 1 unless $raf->Read($buff, $size) == $size
316 9 5 $type == 13 ? :
318 0 14 unless $raf->Read($buff, $len) == $len
323 0 68 if $ref >= @$table
326 9 5 if ($type == 13) { }
328 0 9 if (defined $parent and length $parent > 1000)
337 0 29 unless $raf->Seek($$table[$refs[$i]], 0)
339 0 29 unless defined $key and length $key
341 0 29 unless $raf->Seek($$table[$refs[$i + $size]], 0)
343 15 14 defined $parent ? :
346 0 29 unless defined $obj
347 0 29 unless ($tagTablePtr)
349 0 0 if (not defined $key && $key =~ /^[-_a-zA-Z0-9]+$/) { }
0 0 elsif (not $key =~ /^[_a-zA-Z]/) { }
354 0 0 if defined $obj
357 5 24 if ref $obj eq "HASH"
359 0 24 unless ($tagInfo)
360 0 0 if $verbose
364 0 0 if length $name < 2 or $name =~ /^[-0-9]/
366 0 0 if ($plistInfo->{'DateFormat'})
373 22 2 if ($et->{'LastPListTag'} and $et->{'LastPListTag'} ne $tagInfo)
382 0 10 unless $raf->Seek($table->[$ref], 0)
384 1 9 unless defined $val and ref $val ne "HASH"
404 7 1 unless $dirInfo->{'NoVerboseDir'}
407 7 1 if ($dataPt)
409 1 6 if ($start or $dirInfo->{'DirLen'} and $dirInfo->{'DirLen'} != length $$dataPt) { }
418 0 8 unless my $raf = $dirInfo->{'RAF'}
419 0 8 unless $raf->Seek(-32, 2) and $raf->Read($buff, 32) == 32
426 0 8 if $topObj >= $numObj
427 0 8 unless my $intProc = $readProc{$intSize}
428 0 8 unless my $refProc = $readProc{$refSize}
432 0 8 unless $raf->Seek($tableOff, 0) and $raf->Read($buff, $tableSize) == $tableSize
444 0 8 unless $raf->Seek($table[$topObj], 0)
446 8 0 defined $dirInfo->{'Value'} ? :
460 1 6 if ($dataPt)
462 1 0 unless $$dataPt =~ /\G
464 6 1 unless ($notXML)
469 2 4 if $result
473 4 1 if ($raf) { }
474 0 4 unless $raf->Seek(0, 0) and $raf->Read($buff, 64)
477 0 1 unless $dataPt
480 2 3 if ($$dataPt =~ /\Gbplist0/) { }
0 3 elsif ($$dataPt =~ /^\{"/) { }
0 3 elsif ($et->{'FILE_EXT'} and $et->{'FILE_EXT'} eq 'PLIST' and $$dataPt =~ /^\xfe\xff\x00/) { }
485 0 2 unless (&ProcessBinaryPLIST($et, $dirInfo, $tagTablePtr))
491 0 0 if $raf