Condition Coverage

blib/lib/Image/ExifTool/XMP.pm
Criterion Covered Total %
condition 259 467 55.4


and 2 conditions

line l !l condition
3331 0 0 $_ eq "undef" and $_ = undef
3516 0 23 $tagInfo = $tagTablePtr->{$tagID} and last NoLoop

and 3 conditions

line !l l&&!r l&&r condition
2934 4 150 0 $enc and $enc ne "UTF8"
2953 0 0 26 $ch >= 194 and $ch < 248
2958 0 0 0 $ch == 224 and (ord $1 & 224) == 128
0 0 0 $ch == 237 and (ord $1 & 224) == 160
0 0 0 $ch == 239 and ord $1 == 191
0 0 0 $ch == 239 and ord $1 == 191 and (ord substr($1, 1) & 254) == 190
2963 0 0 0 $ch == 240 and (ord $1 & 240) == 128
0 0 0 $ch == 244 and ord $1 > 143
3031 39911 2338 880 $structProps and @$structProps
42249 440 440 $structProps and @$structProps and $prop =~ /^rdf:li (\d+)$/
3044 238 0 63 ref $info eq "HASH" and $info->{'SubDirectory'}
3047 238 48 15 $table and $table->{$nm}
3092 26 6 0 $Image::ExifTool::XMP::nsURI{$ns} and $Image::ExifTool::XMP::nsURI{$ns} ne $nsRef->{$ns}
3121 0 0 0 ref $tagInfo eq "HASH" and $tagInfo->{'Struct'}
3155 5258 245 52 $fieldInfo->{'Struct'} and $noSubStruct
3198 5322 0 177 $fieldInfo->{'Groups'} and $fieldInfo->{'Groups'}{'2'}
5231 91 0 $strTable->{'GROUPS'} and $strTable->{'GROUPS'}{'2'}
3229 12 0 107 $tagInfo->{'Writable'} and $tagInfo->{'Writable'} eq "lang-alt"
3312 0 0 0 $alt{$mk} and $make =~ /$alt{$mk}/i
3335 0 0 0 $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)
3351 0 0 0 $mk eq "Pentax" and $id =~ /^\d+$/
3386 237 0 74 not $unsure and $val =~ /^(\d{4})(-\d{2}){0,2}/
3452 4 0 0 $tag eq "id" and $props->[1] eq "svg:metadata"
3463 3509 4 219 not $ns and $grp0 ne "XMP"
3509 0 4 $grp0 eq "XML" and not $table
3513 0 2 46 ref $ti eq "HASH" and $ti->{'Struct'}
3553 0 0 22 ref $tg eq "HASH" and $tg->{'SubDirectory'}
3565 0 0 0 ref $ti3 eq "HASH" and $ti3->{'Struct'}
3599 74 46 84 $et->{'curURI'}{$ns} and $et->{'curURI'}{$ns} =~ m[^http://ns.exiftool.(?:ca|org)/(.*?)/(.*?)/]
3618 8 179 17 @$props > 2 and $props->[-1] =~ /^rdf:li \d+$/
187 0 17 @$props > 2 and $props->[-1] =~ /^rdf:li \d+$/ and $props->[-2] =~ /^rdf:(Bag|Seq|Alt)$/
3621 5 0 12 $lang and $1 eq "Alt"
3630 188 0 16 $tagTablePtr->{$tagID} and $tagTablePtr->{$tagID} eq $tagInfo
3634 181 7 0 not length $val and $attrs->{'rdf:parseType'}
7 0 0 not length $val and $attrs->{'rdf:parseType'} and $attrs->{'rdf:parseType'} eq "Resource"
3645 3503 0 0 $enc and $enc =~ /base64/
3650 3425 254 53 defined $lang and lc $lang ne "x-default"
3675 3490 0 242 $tagInfo->{'IsDefault'} && $et->{'OPTIONS'}{'XMPAutoConv'}
3678 1214 240 199 $new || $fmt eq 'rational' and &ConvertRational($val)
3683 1344 108 2 $stdDate and $added
3688 1653 0 0 $et->{'XmpValidate'} and $fmt
1653 0 0 $et->{'XmpValidate'} and $fmt and $fmt eq "boolean"
0 0 0 $et->{'XmpValidate'} and $fmt and $fmt eq "boolean" and not $val =~ /^True|False$/
3696 1411 242 0 $new and length $val > 65536
3707 3064 339 329 @structProps and @structProps > 1 || defined $structProps[0][1]
339 0 329 @structProps and @structProps > 1 || defined $structProps[0][1] and not $et->{'NO_STRUCT'}
3713 223 113 3396 $ns and not $tagInfo->{'StaticGroup1'}
3720 3544 188 0 $added and $et->{'OPTIONS'}{'Verbose'}
3733 3730 0 2 $tagInfo->{'SubDirectory'} and not $et->{'IsWriting'}
3737 2 0 0 $tagInfo->{'Encoding'} and $tagInfo->{'Encoding'} eq "Base64"
3851 7707 0 0 $et->{'EXCL_XMP_LOOKUP'} and not $isWriting
7707 0 0 $et->{'EXCL_XMP_LOOKUP'} and not $isWriting and $prop =~ /^(.+):(.*)/
3950 145 208 0 /(.*?):/ and $1 eq $ns
353 0 0 /(.*?):/ and $1 eq $ns and $1 ne $newNS
4038 1 16 0 @$propList > 1 and not $propList->[1] =~ /\b(metadata|desc|title)$/
4094 13 337 10 $stdNS and $stdNS eq 'x' || $stdNS eq 'iX'
4110 2096 345 479 ref $recognizedAttrs{$propName} and $shortVal
4113 247 0 232 defined $et->{'VALUE'}{$name} and $et->{'VALUE'}{$name} eq $tval
4162 3623 1 16 $prop eq "rdf:Description" and $val
4167 3572 65 3 $val eq "" and $attrs =~ /\brdf:(?:value|resource)=(['"])(.*?)\1/ || $attrs =~ /\brdf:about=(['"])(.*?)\1/
4179 3663 0 8 $lastProp eq "rdf:type" and $wasEmpty
3663 0 0 $lastProp =~ /^et:(desc|prt|val)$/ and $count || $1 eq 'desc'
4220 7600 290 4 $processBlankInfo and %{$blankInfo->{'Prop'};}
4265 307 2 9 $Image::ExifTool::MWG::strict || $et->{'OPTIONS'}{'Validate'} and not $et->{'XMP_CAPTURE'} || $et->{'DOC_NUM'}
309 7 2 $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'
4270 1 6 0 $stdPath{$et->{'FILE_TYPE'}} && $path ne $stdPath{$et->{'FILE_TYPE'}}
4271 7 0 0 $nonStd and $Image::ExifTool::MWG::strict
4340 0 0 7 defined $fmt and not $fmt
0 6 1 defined $fmt and not $fmt and $buf2 =~ /^[^\n\r]*[\n\r]+<\?aid /s
4377 6 1 0 $isSVG and $et->{'XMP_CAPTURE'}
4397 0 2 0 $ext and $ext eq "MODD"
4402 54 0 3 $isXML and not $hasXMP
54 3 0 $isXML and not $hasXMP and not $isRDF
4407 0 0 0 $ext and $ext eq "COS"
4413 61 0 0 $fast and $fast == 3
4415 57 3 1 $type and $type eq "INX"
4482 249 7 38 $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
4488 40 0 0 $blockExtract and $blockExtract > 1
4492 293 0 1 $et->Options("Verbose") and not $et->{'XMP_CAPTURE'}
4504 67 0 3 $$dataPt =~ / $dirStart
67 0 3 $$dataPt =~ / $dirStart and pos $$dataPt < $dirEnd
4549 284 10 0 $et->{'XMP_NO_XPACKET'} and $et->{'OPTIONS'}{'Validate'}
10 0 0 $et->{'XMP_NO_XPACKET'} and $et->{'OPTIONS'}{'Validate'} and $stdPath{$et->{'FILE_TYPE'}}
10 0 0 $et->{'XMP_NO_XPACKET'} and $et->{'OPTIONS'}{'Validate'} and $stdPath{$et->{'FILE_TYPE'}} and $path eq $stdPath{$et->{'FILE_TYPE'}}
0 0 0 $et->{'XMP_NO_XPACKET'} and $et->{'OPTIONS'}{'Validate'} and $stdPath{$et->{'FILE_TYPE'}} and $path eq $stdPath{$et->{'FILE_TYPE'}} and not $dirInfo->{'IsExtended'}
0 0 0 $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'}
4603 0 0 0 $dirInfo->{'DirName'} and $dirInfo->{'DirName'} eq "XMP"
4619 0 227 67 $rtnVal and $dirInfo->{'RAF'}

or 2 conditions

line l !l condition
3067 3656 240 $namespace || ''
3194 61 1765 $fieldInfo->{'List'} || 1
3387 123 1 $5 || ''
3544 22 0 $tagTablePtr->{'NAMESPACE'} || ''
3782 154 10 $et->{'XMPParseOpts'}{'FoundProc'} || \&Image::ExifTool::XMP::FoundXMP
4279 0 7 $et->{'DIR_COUNT'}{'XMP'} || 0
4283 132 101 $dirInfo->{'DirStart'} || 0
4487 2 38 $dirInfo->{'BlockInfo'} || 'XMP'

or 3 conditions

line l !l&&r !l&&!r condition
2893 0 0 0 $str =~ /[\0-\x1f]/ or &Image::ExifTool::IsUTF8(\$str) < 0
2958 0 0 0 $ch == 224 and (ord $1 & 224) == 128 or $ch == 237 and (ord $1 & 224) == 160
0 0 0 $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
2963 0 0 0 $ch == 240 and (ord $1 & 240) == 128 or $ch == 244 and ord $1 > 143
0 0 0 $ch == 240 and (ord $1 & 240) == 128 or $ch == 244 and ord $1 > 143 or $ch > 244
3026 43105 24 31475 $ignoreNamespace{$ns} or $ignoreProp{$prop}
24 0 31475 $ignoreNamespace{$ns} or $ignoreProp{$prop} or $ignoreEtProp{$prop}
3041 0 79 222 $Image::ExifTool::XMP::stdXlatNS{$ns} || $ns
3158 668 4835 0 $fieldInfo->{'FlatName'} || $fieldName
3173 1 32 233 $_ eq "PropertyPath" or defined $flatInfo->{$_}
3194 61 1765 1155 $fieldInfo->{'List'} or $tagInfo->{'List'}
3206 3176 2323 0 $tagInfo->{'RootTagInfo'} || $tagInfo
3260 0 0 0 defined $buff or $raf->Read($buff, 65536)
3312 0 0 0 $make =~ /$mk/i or $alt{$mk} and $make =~ /$alt{$mk}/i
3314 0 0 0 {'Sigma', 'SigmaRaw', 'Leica', 'Panasonic'}->{$mk} || $mk
3319 0 0 0 {'Nikon', 'nikonLensIDs'}->{$mk} || lc($mk) . 'LensTypes'
3335 0 0 0 $focalLength && ($sf && $focalLength < $sf - 0.5 || $lf && $focalLength > $lf + 0.5) || $maxAv && ($sa && $maxAv < $sa - 0.15 || $la && $maxAv > $la + 0.15)
3372 0 0 0 $printConv->{$id} || "Unknown ($id)"
3480 162 0 0 $ns =~ /^[A-Z_a-z\x80-\xff][-.0-9A-Z_a-z\x80-\xff]*$/ or $ns eq ""
3502 216 11 3505 not $tagInfo or $tagInfo->{'Flat'}
3534 1 0 22 $strTable->{'NAMESPACE'} or not exists $strTable->{'NAMESPACE'}
3541 4 18 0 $xmpNS{$n} || $n
3556 0 0 22 not $sti or $sti->{'Flat'}
3644 0 0 3503 $attrs->{'rdf:datatype'} || $attrs->{'et:encoding'}
3647 0 0 0 length $$val > 100 or $$val =~ /[\0-\x08\x0b\0x0c\x0e-\x1f]/
3676 1411 242 2079 $fmt or $new
3678 242 197 1214 $new || $fmt eq 'rational'
3682 240 170 1044 $new or $fmt eq "date"
3700 1 0 0 $rawVal || $val
3707 151 178 339 @structProps > 1 || defined $structProps[0][1]
3745 0 2 0 $subdir->{'DirName'} || $tagInfo->{'Name'}
3753 2 0 0 &GetTagTable($subdir->{'TagTable'}) || $tagTablePtr
3807 4 3033 8450 not $$dataPt =~ m[<([?/]?)([-\w:.\x80-\xff]+|!--)([^>]*)>]gs or pos $$dataPt > $end
3814 159 0 0 $attrs =~ /--$/ or $$dataPt =~ /-->/gs
3830 0 0 7903 not $$dataPt =~ m[<(/?)$prop([-\w:.\x80-\xff]*)(.*?(/?))>]gs or pos $$dataPt > $end
3852 0 0 0 $Image::ExifTool::XMP::stdXlatNS{$1} || $1
3853 0 0 0 $et->{'EXCL_XMP_LOOKUP'}{"xmp-${ns}:all"} or $et->{'EXCL_XMP_LOOKUP'}{"xmp-${ns}:$nm"}
0 0 0 $et->{'EXCL_XMP_LOOKUP'}{"xmp-${ns}:all"} or $et->{'EXCL_XMP_LOOKUP'}{"xmp-${ns}:$nm"} or $et->{'EXCL_XMP_LOOKUP'}{"xmp-all:$nm"}
3930 2 0 48 $curURI->{$ns} or $Image::ExifTool::XMP::nsURI{$ns}
3996 566 71 798 $nItems or grep /^rdf:li /, @$propList
4037 0 0 17 $et->{'OPTIONS'}{'Unknown'} > 1 or $et->{'OPTIONS'}{'Verbose'}
4043 1 1 15 $prop eq "svg" or $prop eq "metadata"
4094 59 10 278 $stdNS eq 'x' || $stdNS eq 'iX'
4107 2715 3 1039 $ignoreNamespace{$ns} or $ignoreProp{$prop}
3 202 837 $ignoreNamespace{$ns} or $ignoreProp{$prop} or $ignoreEtProp{$propName}
4134 635 0 18 not $shorthand or $valEnd != $valStart
4154 107 6317 31 $valStart == $valEnd or not &ParseXMPElement($et, $tagTablePtr, $dataPt, $valStart, $valEnd, $propList, $blankInfo)
4167 15 3 50 $attrs =~ /\brdf:(?:value|resource)=(['"])(.*?)\1/ || $attrs =~ /\brdf:about=(['"])(.*?)\1/
4176 3645 39 17 length $val or not $shorthand
4179 0 0 0 $count || $1 eq 'desc'
4199 0 0 0 $et->{'definedNS'}{$_} or $_ eq "xml"
4265 11 0 307 $Image::ExifTool::MWG::strict || $et->{'OPTIONS'}{'Validate'}
2 0 9 $et->{'XMP_CAPTURE'} || $et->{'DOC_NUM'}
6 1 2 ($dirInfo->{'DirName'} || '') eq 'XMP' || $et->{'FILE_TYPE'} eq 'XMP'
4284 202 31 0 $dirInfo->{'DirLen'} || length($$dataPt) - $dirStart
4285 203 30 0 $dirInfo->{'DataLen'} || length $$dataPt
4482 27 0 249 $et->{'REQ_TAG_LOOKUP'}{lc $blockName} || $et->{'TAGS_FROM_FILE'} && !$et->{'EXCL_TAG_LOOKUP'}{lc $blockName} || $blockExtract
6 34 5 $et->{'FileType'} eq 'XMP' && $blockName eq 'XMP' || $dirInfo->{'DirName'} && $dirInfo->{'DirName'} eq $blockName
4504 7 0 287 $isXML or $isRDF
4557 33 0 1 $dirStart or $dirEnd != length $$dataPt
4600 5 0 289 $dirInfo->{'BlockInfo'} or $dirInfo->{'NoStruct'}