Branch Coverage

blib/lib/Image/ExifTool/XMP.pm
Criterion Covered Total %
branch 482 742 64.9


line true false branch
2608 4387 154 unless $conv
2623 0 0 if ($str =~ /[\0-\x1f]/ or &IsUTF8(\$str) < 0)
2653 122 109 unless (defined $val)
2654 112 10 if ($ch =~ /^#x([0-9a-fA-F]+)$/) { }
10 0 elsif ($ch =~ /^#(\d+)$/) { }
2662 77 154 if $val < 128
2663 154 0 $] >= 5.006001 ? :
2664 0 154 if $enc and $enc ne "UTF8"
2679 41 13 unless $$strPt =~ /([\x80-\xff])/g
2686 2 153 if $ch < 194 or $ch >= 248
2689 75 78 if ($ch < 224) { }
78 0 elsif ($ch < 240) { }
2700 1 152 unless ($$strPt =~ /\G([\x80-\xbf]{$n})/g)
2701 0 1 if $trunc and $pos + $n > length $$strPt
2705 77 75 if ($n == 2) { }
2706 0 1 if $ch == 224 and (ord $1 & 224) == 128 or $ch == 237 and (ord $1 & 224) == 160 or $ch == 239 and ord $1 == 191 and (ord substr($1, 1) & 254) == 190
2711 0 75 if $ch == 240 and (ord $1 & 240) == 128 or $ch == 244 and ord $1 > 143 or $ch > 244
2714 10 142 unless $$strPt =~ /([\x80-\xff])/g
2730 1295 25 unless $$strPt =~ /([\x80-\xff])/g
2734 25 0 if ($ch >= 194 and $ch < 248)
2735 0 0 $ch < 240 ? :
25 0 $ch < 224 ? :
2736 25 0 if ($$strPt =~ /\G([\x80-\xbf]{$n})/g)
2737 25 0 if $n == 1
2738 0 0 if ($n == 2) { }
2739 0 0 unless $ch == 224 and (ord $1 & 224) == 128 or $ch == 237 and (ord $1 & 224) == 160 or $ch == 239 and ord $1 == 191 and (ord substr($1, 1) & 254) == 190
2744 0 0 unless $ch == 240 and (ord $1 & 240) == 128 or $ch == 244 and ord $1 > 143 or $ch > 244
2750 0 0 unless defined $bad
2786 7 1 if ($i < $len)
2806 65517 544 $prop =~ /(.*?):(.*)/ ? :
2807 38600 27461 if ($ignoreNamespace{$ns} or $ignoreProp{$prop}) { }
2810 38600 0 unless ($prop =~ /^rdf:(_\d+)$/)
2812 439 2760 if ($structProps and @$structProps and $prop =~ /^rdf:li (\d+)$/)
2817 0 0 if defined $tag
2821 292 27169 unless ($nm =~ /[a-z]/)
2825 55 0 if (ref $info eq "HASH" and $info->{'SubDirectory'})
2828 277 15 unless ($table and $table->{$nm})
2833 11419 16042 if (defined $tag) { }
2839 1378 26083 if ($structProps)
2841 460 918 if $nsList
2845 16333 11128 unless $namespace
2847 3781 12278 if (wantarray) { }
2861 500 28 unless ref $table->{'NAMESPACE'}
2865 0 28 if (ref $nsRef eq 'ARRAY') { }
2873 0 28 if ($Image::ExifTool::XMP::nsURI{$ns} and $Image::ExifTool::XMP::nsURI{$ns} ne $nsRef->{$ns})
2897 4972 0 if (defined $tagID) { }
2902 0 0 unless ref $tagInfo eq "HASH" and $tagInfo->{'Struct'}
2912 4466 506 if $tagInfo->{'Flattened'}
2916 0 506 unless (ref $strTable)
2918 0 0 unless $strTable = $Image::ExifTool::UserDefined::xmpStruct{$strTable}
2919 0 0 unless $strTable->{'STRUCT_NAME'}
2925 155 351 defined $tagInfo->{'FlatName'} ? :
2929 281 225 if $tagInfo->{'Groups'}
2930 225 281 unless $tagG2
2933 1071 4854 if $Image::ExifTool::XMP::specialStruct{$field}
2935 5 4849 if $fieldInfo->{'LangCode'}
2936 44 4805 if $fieldInfo->{'Struct'} and $noSubStruct
2942 314 4491 if ($flatInfo) { }
2943 0 314 unless ref $flatInfo eq "HASH"
2945 4 310 unless (defined $flatInfo->{'Flat'})
2946 4 0 if $flatInfo->{'NotFlat'}
2947 0 0 if $Image::ExifTool::debug
2954 33 226 if $_ eq "PropertyPath" or defined $flatInfo->{$_}
2956 12 214 $_ eq 'Groups' ? :
2960 59 251 if $flatInfo->{'List'}
2965 616 3875 if $fieldInfo->{'FlatName'}
2967 165 4326 if $fieldInfo->{'Groups'}
2973 2613 2188 unless (defined $flatInfo->{'List'})
2974 1628 985 if $fieldInfo->{'List'} or $tagInfo->{'List'}
2978 177 4624 if ($fieldInfo->{'Groups'} and $fieldInfo->{'Groups'}{'2'}) { }
84 4540 elsif ($strTable->{'GROUPS'} and $strTable->{'GROUPS'}{'2'}) { }
2988 4587 214 unless $flatInfo->{'Struct'}
2989 0 214 if length $flatID > 250
3008 8 99 unless $tagInfo->{'Writable'} and $tagInfo->{'Writable'} eq "lang-alt"
3022 13 40 if $lang =~ /^([a-z]{2,3}|[xi])(-[a-z]{2})\b(.*)/i
3039 0 0 unless defined $buff or $raf->Read($buff, 65536)
3040 0 0 unless (defined $xmp)
3042 0 0 unless ($lastBuff =~ /(<\?xpacket begin=)/g)
3044 0 0 length $buff <= 15 ? :
3053 0 0 if $pos > 0
3054 0 0 if ($xmp =~ /<\?xpacket end=['"][wr]['"]\?>/g) { }
3058 0 0 unless $pos = rindex($xmp, "\0") + 1
3065 0 0 unless ($et->{'VALUE'}{'FileType'})
3091 0 0 unless $make =~ /$mk/i or $alt{$mk} and $make =~ /$alt{$mk}/i
3100 0 0 unless %$convName
3108 0 0 if ($info)
3114 0 0 if ($mk eq 'Sony' and $focalLength && ($sf && $focalLength < $sf - 0.5 || $lf && $focalLength > $lf + 0.5) || $maxAv && ($sa && $maxAv < $sa - 0.15 || $la && $maxAv > $la + 0.15)) { }
0 0 elsif ($maxAv) { }
3130 0 0 if ($mk eq "Pentax" and $id =~ /^\d+$/)
3136 0 0 if ($mk eq "Nikon")
3138 0 0 if length $id & 1
3139 0 0 if $id =~ s/(..)/$1 /g
3144 0 0 if $used{$lens}
3146 0 0 $i ? :
3165 119 304 if ($val =~ /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}:\d{2})(:\d{2})?\s*(\S*)$/) { }
73 462 elsif (not $unsure and $val =~ /^(\d{4})(-\d{2}){0,2}/) { }
3181 234 204 unless $val =~ m[^(-?\d+)/(-?\d+)$]
3182 202 2 if ($2 != 0) { }
0 2 elsif ($1) { }
3200 0 1 unless @vals == 4
3202 0 4 unless &ConvertRational($_)
3218 672 2968 $et->{'OPTIONS'}{'Struct'} ? :
3219 17 3623 unless $tag
3222 86 3537 if $Image::ExifTool::XMP::stdXlatNS{$ns}
3225 3255 368 if ($info) { }
9 359 elsif ($props->[0] eq 'svg:svg') { }
3226 0 3255 unless $table = $info->{'SubDirectory'}{'TagTable'}
3228 4 5 if (not $ns) { }
5 0 elsif (not grep(/^rdf:/, @$props)) { }
3230 0 4 if $tag eq "id" and $props->[1] eq "svg:metadata"
3241 203 3420 if (not $ns and $grp0 ne 'XMP') { }
4 3416 elsif ($grp0 eq 'XML' and not $table) { }
3247 0 3416 if $grp0 eq "XML"
3249 152 3264 unless $table
3251 3259 157 if ($tagTablePtr->{'NAMESPACE'}) { }
3255 157 0 unless (defined $xns)
3258 0 157 unless ($ns =~ /^[A-Z_a-z\x80-\xff][-.0-9A-Z_a-z\x80-\xff]*$/ or $ns eq "")
3262 0 0 unless $ns =~ /^[A-Z_a-z\x80-\xff]/
3270 14 143 if @structProps
3275 3416 207 if $attrs
3287 220 218 $t ? :
3289 81 357 if defined $addedFlat
3290 312 45 unless $ti = $tagTablePtr->{$t}
3291 0 45 unless ref $ti eq "HASH" and $ti->{'Struct'}
3294 22 23 if $addedFlat
3301 23 173 if (defined $addedFlat)
3306 8 33 unless $ti = $tagTablePtr->{$t}
3307 0 33 unless ref $ti eq "HASH"
3308 10 23 unless my $strTable = $ti->{'Struct'}
3309 0 23 defined $ti->{'FlatName'} ? :
3312 1 22 if $strTable->{'NAMESPACE'} or not exists $strTable->{'NAMESPACE'}
3318 4 18 if $Image::ExifTool::XMP::stdXlatNS{$n}
3322 0 22 if $xn eq ($tagTablePtr->{'NAMESPACE'} || '')
3326 17 5 if (@structProps)
3331 0 22 unless ref $tg eq "HASH" and $tg->{'SubDirectory'}
3332 0 22 unless my $tbl = &GetTagTable($tg->{'SubDirectory'}{'TagTable'})
3334 0 22 if (not $sti or $sti->{'Flat'})
3342 0 0 unless my $ti3 = $tbl->{$t3}
3343 0 0 unless ref $ti3 eq "HASH" and $ti3->{'Struct'}
3344 0 0 unless &AddFlattenedTags($tbl, $t3)
3348 0 0 unless $sti
3357 22 0 if $sti->{'Groups'}
3362 173 23 unless ($tagInfo)
3364 27 146 if ($et->{'ShortenXmpTags'})
3371 122 74 if $xns
3372 78 118 if ($et->{'curURI'}{$ns} and $et->{'curURI'}{$ns} =~ m[^http://ns.exiftool.(?:ca|org)/(.*?)/(.*?)/])
3376 20 58 if ($grps{'1'} =~ /^\d/)
3388 17 171 if (@$props > 2 and $props->[-1] =~ /^rdf:li \d+$/ and $props->[-2] =~ /^rdf:(Bag|Seq|Alt)$/)
3391 12 5 if ($lang and $1 eq 'Alt') { }
3401 180 16 unless $tagTablePtr->{$tagID}
3403 0 7 if (not length $val and $attrs->{'rdf:parseType'} and $attrs->{'rdf:parseType'} eq "Resource")
3410 3420 203 if ($attrs)
3412 1 3419 if ($enc and $enc =~ /base64/)
3414 0 1 unless length $$val > 100 or $$val =~ /[\0-\x08\x0b\0x0c\x0e-\x1f]/
3417 53 3570 if (defined $lang and lc $lang ne "x-default")
3420 53 0 if $langInfo
3424 9 3614 if ($val =~ //gs) { }
3443 1628 1995 if ($fmt or $new)
3445 199 1429 if ($new || $fmt eq 'rational' and &ConvertRational($val)) { }
3448 400 1029 if $new or $fmt eq "date"
3450 0 0 if ($et->{'XmpValidate'} and $fmt and $fmt eq "boolean")
3454 0 1628 if $new and length $val > 65536
3457 0 3623 unless my $key = $et->FoundTag($tagInfo, $val)
3459 199 3424 if defined $rational
3461 329 339 if (@structProps and @structProps > 1 || defined $structProps[0][1] and not $et->{'NO_STRUCT'})
3467 0 3623 if ($xmlGroups) { }
3307 523 elsif ($ns and not $tagInfo->{'StaticGroup1'}) { }
3474 1 3622 if ($et->{'OPTIONS'}{'Verbose'})
3475 0 1 if ($added)
3477 0 0 if (@$added > 1) { }
3491 0 3623 if ($tagInfo->{'SubDirectory'} and not $et->{'IsWriting'})
3493 0 0 ref $et->{'VALUE'}{$key} ? :
3495 0 0 if $tagInfo->{'Encoding'} and $tagInfo->{'Encoding'} eq "Base64"
3505 0 0 if $subdir->{'ByteOrder'}
3535 154 7525 if ($et->{'XMPParseOpts'}) { }
3541 184 7495 unless $start
3542 0 7679 unless $end
3543 276 7403 unless $propList
3547 276 7403 unless $blankInfo
3558 4643 11188 if pos $$dataPt > $end - 4
3562 2969 8219 if not $$dataPt =~ m[<([?/]?)([-\w:.\x80-\xff]+|!--)([^>]*)>]gs or pos $$dataPt > $end
3565 556 7663 if $1
3568 158 7505 if ($prop eq "!--")
3569 158 0 if $attrs =~ /--$/ or $$dataPt =~ /-->/gs
3576 7384 121 if (not $attrs =~ s[/$][]) { }
3585 0 7706 if (not $$dataPt =~ m[<(/?)$prop([-\w:.\x80-\xff]*)(.*?(/?))>]gs or pos $$dataPt > $end)
3591 38 7668 if $2
3592 7524 144 if ($1)
3593 140 7384 if --$nesting
3598 140 4 unless $4
3606 0 0 if ($et->{'EXCL_XMP_LOOKUP'} and not $isWriting and $prop =~ /^(.+):(.*)/)
3608 0 0 if ($et->{'EXCL_XMP_LOOKUP'}{"xmp-${ns}:all"} or $et->{'EXCL_XMP_LOOKUP'}{"xmp-${ns}:$nm"} or $et->{'EXCL_XMP_LOOKUP'}{"xmp-all:$nm"})
3621 3789 483 if ($attr =~ /(.*?):/)
3622 1526 2263 if ($1 eq 'xmlns') { }
3626 1507 19 unless $et->{'definedNS'}{$ns}
3627 46 1480 unless ($stdNS)
3630 14 32 unless $try =~ s[/$][]
3632 0 46 if ($stdNS) { }
3640 0 46 if ($good)
3648 1480 46 if ($stdNS) { }
0 46 elsif ($et->{'curNS'}{$val}) { }
3650 202 1278 if ($stdNS ne $ns) { }
2 1276 elsif ($xlatNS->{$ns}) { }
3658 0 0 if $et->{'curNS'}{$val} ne $ns
3664 2 44 if ($curURI->{$ns} or $Image::ExifTool::XMP::nsURI{$ns})
3674 206 1320 if (defined $newNS)
3677 79 127 unless $saveNS
3678 204 2 if (length $newNS) { }
3684 187 0 unless /(.*?):/ and $1 eq $ns and $1 ne $newNS
3695 92 2171 if $xlatNS->{$1}
3702 7160 345 if ($prop =~ /(.*?):/)
3705 241 6919 if $xlatNS->{$1}
3708 1411 6094 if ($prop eq 'rdf:li') { }
751 5343 elsif ($prop eq 'rdf:Description') { }
0 5343 elsif ($prop eq 'xmp:xmpmeta') { }
3710 0 1411 if ($nItems == 1000)
3712 0 0 if ($isWriting) { }
0 0 elsif (not $et->{'OPTIONS'}{'IgnoreMinorErrors'}) { }
3730 780 71 unless ($nItems or grep /^rdf:li /, @$propList)
3737 4 747 if (grep /^rdf:Description$/, @$propList)
3745 0 0 if $et->{'XmpValidate'}
3750 58 7447 if ($attrProc)
3752 53 5 if (&$attrProc(\@attrs, \%attrs, \$prop, \$val))
3759 16 7489 if (defined $attrs{'rdf:nodeID'})
3767 7505 0 unless $parseResource
3769 16 7489 if ($isSVG) { }
13 7476 elsif ($et->{'XmpIgnoreProps'}) { }
3771 16 0 unless ($et->{'OPTIONS'}{'Unknown'} > 1 or $et->{'OPTIONS'}{'Verbose'})
3772 0 16 if (@$propList > 1 and not $propList->[1] =~ /\b(metadata|desc|title)$/)
3777 2 14 if ($prop eq "svg" or $prop eq "metadata")
3783 2 36 unless @$propList
3784 2 34 if $_ eq $propList->[0]
3792 16 4150 unless defined $attrs{$shortName}
3795 3773 377 if ($propName =~ /(.*?):(.*)/) { }
250 127 elsif ($prop =~ /(\S*?):/) { }
3809 737 3413 if ($propName eq "rdf:about")
3810 452 285 if (not $et->{'XmpAbout'}) { }
0 285 elsif ($et->{'XmpAbout'} ne $attrs{$shortName}) { }
3813 0 0 if ($isWriting) { }
0 0 elsif ($et->{'XmpValidate'}) { }
3815 0 0 unless ($et->{'WARNED_ONCE'}{$str})
3824 1227 2923 if ($isWriting)
3826 341 886 if ($ns eq 'xmlns') { }
203 683 elsif ($recognizedAttrs{$propName}) { }
3828 276 65 unless ($stdNS and $stdNS eq 'x' || $stdNS eq 'iX')
3830 273 3 unless defined $nsUsed->{$name}
3839 2804 802 if ($ignoreNamespace{$ns} or $ignoreProp{$prop})
3842 466 2338 if (ref $recognizedAttrs{$propName} and $shortVal)
3845 235 231 unless (defined $et->{'VALUE'}{$name} and $et->{'VALUE'}{$name} eq $tval)
3854 4 798 if (defined $nodeID) { }
512 286 elsif ($isWriting) { }
3859 0 286 if $et->{'XmpValidate'}
3865 1222 6283 if ($isWriting) { }
3866 579 643 if (&ParseXMPElement($et, $tagTablePtr, $dataPt, $valStart, $valEnd, $propList, $blankInfo)) { }
625 18 elsif (not $shorthand or $valEnd != $valStart) { }
3871 0 579 if $ignored
3875 8 617 if ($prop eq "rdf:Description")
3878 13 612 if (defined $nodeID) { }
3886 3614 2669 if ($valStart == $valEnd or not &ParseXMPElement($et, $tagTablePtr, $dataPt, $valStart, $valEnd, $propList, $blankInfo))
3891 3561 53 unless (defined $val)
3894 16 3545 if ($prop eq "rdf:Description" and $val)
3899 17 48 if ($val eq "" and $attrs =~ /\brdf:(?:value|resource)=(['"])(.*?)\1/ || $attrs =~ /\brdf:about=(['"])(.*?)\1/)
3908 3601 13 if (length $val or not $shorthand)
3910 0 3601 unless defined $lastProp
3911 13 3588 if (defined $nodeID) { }
8 3580 elsif ($lastProp eq 'rdf:type' and $wasEmpty) { }
0 3580 elsif ($lastProp =~ /^et:(desc|prt|val)$/ and $count || $1 eq 'desc') { }
3919 0 3580 if $et->{'XmpValidate'}
3925 7505 0 unless $parseResource
3929 0 7505 if ($et->{'XmpValidate'})
3931 0 0 if $et->{'definedNS'}{$_} or $_ eq "xml"
3932 0 0 if (defined $et->{'definedNS'}{$_}) { }
3945 67 7438 if $start >= $end
3952 4 7675 if ($processBlankInfo and %{$blankInfo->{'Prop'};})
3957 79 7600 if $saveNS
3997 7 2 if ($Image::ExifTool::MWG::strict || $et->{'OPTIONS'}{'Validate'} and not $et->{'XMP_CAPTURE'} || $et->{'DOC_NUM'} and ($dirInfo->{'DirName'} || '') eq 'XMP' || $et->{'FILE_TYPE'} eq 'XMP')
4001 0 7 if $et->{'OPTIONS'}{'Validate'}
4003 0 0 if ($nonStd and $Image::ExifTool::MWG::strict)
4007 0 7 if ($nonStd) { }
7 0 elsif (not $dirInfo->{'IsExtended'}) { }
4010 0 7 if $et->{'DIR_COUNT'}{'XMP'}
4014 216 83 if ($dataPt) { }
4020 0 216 if $$dataPt =~ /\G((\0\0)?\xfe\xff|\xff\xfe(\0\0)?|\xef\xbb\xbf)\0*<\0*\?\0*x\0*p\0*a\0*c\0*k\0*e\0*t/g
4024 0 83 unless my $raf = $dirInfo->{'RAF'}
4025 16 67 unless $raf->Read($buff, 256)
4030 0 0 if ($buf2 =~ s/^\s*\s+//s) { }
4032 0 0 if length $buf2 > 128
4035 0 0 if length $buf2 > 10000
4037 0 0 unless $raf->Read($buf3, 256)
4044 53 14 if ($buf2 =~ /^\s*(<\?xpacket begin=|
4048 0 14 if ($buf2 =~ /^(\xfe\xff)(<\?xml|
0 14 elsif ($buf2 =~ /^(\xff\xfe)(<\?xml|
7 7 elsif ($buf2 =~ /^(\xef\xbb\xbf)?(<\?xml|
0 7 elsif ($buf2 =~ /^(\xfe\xff|\xff\xfe|\xef\xbb\xbf)(<\?xpacket begin=)/g) { }
4059 0 7 if $1
4060 7 0 if ($2 eq '
0 0 elsif ($2 eq '
0 0 elsif ($2 eq '
4061 1 6 if (defined $fmt and not $fmt and $buf2 =~ /^[^\n\r]*[\n\r]+<\?aid /s) { }
0 6 elsif ($buf2 =~ /
4063 0 1 if ($et->{'XMP_CAPTURE'})
4073 2 4 if ($buf2 =~ /
1 3 elsif ($buf2 =~ /]/) { }
3 0 elsif ($buf2 =~ /
0 0 elsif ($buf2 =~ /]/) { }
4074 0 2 if ($1 eq 'svg') { }
2 0 elsif ($1 eq 'plist') { }
0 0 elsif ($1 eq 'REDXIF') { }
0 0 elsif ($1 ne 'fcpxml') { }
4098 0 1 if ($isSVG and $et->{'XMP_CAPTURE'})
4102 0 7 if ($buff =~ /^\0\0/) { }
0 7 elsif ($buff =~ /^..\0\0/s) { }
7 0 elsif (not $fmt) { }
4107 0 7 if ($buff =~ /^\0/) { }
0 7 elsif ($buff =~ /^.\0/s) { }
4115 3 57 if ($type) { }
4116 2 1 if ($type eq "PLIST")
4118 0 2 if $ext and $ext eq "MODD"
4123 1 56 if ($isSVG) { }
0 56 elsif ($isXML and not $hasXMP and not $isRDF) { }
4128 0 0 if $ext and $ext eq "COS"
4134 0 60 if $fast and $fast == 3
4136 1 59 if ($type and $type eq 'INX') { }
4140 0 1 unless $raf->Seek(0, 0)
4141 0 1 unless $raf->Read($buff, 65536)
4143 1 0 if $buff =~ /
4144 0 0 unless $raf->Read($buf2, 65536)
4149 1 0 if $buff =~ /<\?xpacket end="[rw]"\?>\]\]>/g
4151 0 0 unless $raf->Read($buf2, 65536)
4159 0 59 unless $raf->Seek(0, 2)
4160 0 59 unless $size = $raf->Tell
4161 0 59 unless $raf->Seek(0, 0)
4162 0 59 unless $raf->Read($buff, $size) == $size
4170 0 276 if ($double)
4177 0 0 if ($double eq "\357\273\277") { }
4182 0 0 if (length $double == 2) { }
4183 0 0 $double eq "\376\377" ? :
4185 0 0 $double eq "\000\000\376\377" ? :
4189 0 0 if (&Image::ExifTool::GetWarning()) { }
4201 5 271 $dirInfo->{'BlockInfo'} ? :
4203 40 5 if ($et->{'REQ_TAG_LOOKUP'}{lc $blockName} || $et->{'TAGS_FROM_FILE'} && !$et->{'EXCL_TAG_LOOKUP'}{lc $blockName} || $blockExtract and $et->{'FileType'} eq 'XMP' && $blockName eq 'XMP' || $dirInfo->{'DirName'} && $dirInfo->{'DirName'} eq $blockName)
4209 0 40 if $blockExtract and $blockExtract > 1
4212 58 218 unless $tagTablePtr
4213 1 275 if ($et->Options("Verbose") and not $et->{'XMP_CAPTURE'})
4214 0 1 $isSVG ? :
4225 7 269 if ($isXML or $isRDF) { }
202 67 elsif ($$dataPt =~ /\G\Q$begin\E/cg) { }
1 66 elsif ($$dataPt =~ / $dirStart and pos $$dataPt < $dirEnd) { }
4241 34 32 if ($$dataPt =~ /\G(\0)?\Q$begin\E\0./gs) { }
4243 34 0 if ($1) { }
4245 34 0 if $$dataPt =~ /\G\xfe\xff/g
4247 0 0 if $$dataPt =~ /\G\0\xff\xfe/g
4253 32 0 if (not $$dataPt =~ /\G(\0\0\0)?\Q$begin\E\0\0\0./gs) { }
0 0 elsif ($1) { }
4257 0 0 if $$dataPt =~ /\G\0\0\xfe\xff/g
4259 0 0 if $$dataPt =~ /\G\0\0\0\xff\xfe\0\0/g
4262 0 66 unless defined $fmt
4265 0 0 if ($et->{'XMP_NO_XPACKET'} and $et->{'OPTIONS'}{'Validate'} and $stdPath{$et->{'FILE_TYPE'}} and $path eq $stdPath{$et->{'FILE_TYPE'}} and not $dirInfo->{'IsExtended'} and not $et->{'DOC_NUM'})
4271 34 242 if ($fmt)
4273 33 1 if ($dirStart or $dirEnd != length $$dataPt)
4278 34 0 if ($] >= 5.006001) { }
4289 244 32 if $tagTablePtr eq \%Image::ExifTool::XMP::Main
4295 0 276 if ($dirInfo->{'IgnoreProp'}) { }
4303 36 240 if ($et->{'OPTIONS'}{'Struct'})
4304 21 15 if ($et->{'OPTIONS'}{'Struct'} eq '2') { }
4316 5 271 if $dirInfo->{'BlockInfo'} or $dirInfo->{'NoStruct'}
4319 276 0 if (&ParseXMPElement($et, $tagTablePtr, $dataPt, $dirStart, $dirEnd)) { }
0 0 elsif ($dirInfo->{'DirName'} and $dirInfo->{'DirName'} eq 'XMP') { }
4325 0 0 if ($xmp =~ /^ *\0*$/) { }
4335 66 210 if $rtnVal and $dirInfo->{'RAF'}
4338 28 248 if ($et->{'IsStruct'})