Condition Coverage

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


and 2 conditions

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

and 3 conditions

line !l l&&!r l&&r condition
2908 4 150 0 $enc and $enc ne "UTF8"
2927 0 0 26 $ch >= 194 and $ch < 248
2932 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
2937 0 0 0 $ch == 240 and (ord $1 & 240) == 128
0 0 0 $ch == 244 and ord $1 > 143
3005 39849 2338 880 $structProps and @$structProps
42187 440 440 $structProps and @$structProps and $prop =~ /^rdf:li (\d+)$/
3018 238 0 63 ref $info eq "HASH" and $info->{'SubDirectory'}
3021 238 48 15 $table and $table->{$nm}
3066 26 6 0 $Image::ExifTool::XMP::nsURI{$ns} and $Image::ExifTool::XMP::nsURI{$ns} ne $nsRef->{$ns}
3095 0 0 0 ref $tagInfo eq "HASH" and $tagInfo->{'Struct'}
3129 5250 243 52 $fieldInfo->{'Struct'} and $noSubStruct
3172 5312 0 177 $fieldInfo->{'Groups'} and $fieldInfo->{'Groups'}{'2'}
5221 91 0 $strTable->{'GROUPS'} and $strTable->{'GROUPS'}{'2'}
3203 12 0 107 $tagInfo->{'Writable'} and $tagInfo->{'Writable'} eq "lang-alt"
3286 0 0 0 $alt{$mk} and $make =~ /$alt{$mk}/i
3309 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)
3325 0 0 0 $mk eq "Pentax" and $id =~ /^\d+$/
3360 237 0 74 not $unsure and $val =~ /^(\d{4})(-\d{2}){0,2}/
3426 4 0 0 $tag eq "id" and $props->[1] eq "svg:metadata"
3437 3505 4 219 not $ns and $grp0 ne "XMP"
3505 0 4 $grp0 eq "XML" and not $table
3487 0 2 46 ref $ti eq "HASH" and $ti->{'Struct'}
3527 0 0 22 ref $tg eq "HASH" and $tg->{'SubDirectory'}
3539 0 0 0 ref $ti3 eq "HASH" and $ti3->{'Struct'}
3573 74 46 84 $et->{'curURI'}{$ns} and $et->{'curURI'}{$ns} =~ m[^http://ns.exiftool.(?:ca|org)/(.*?)/(.*?)/]
3592 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)$/
3595 5 0 12 $lang and $1 eq "Alt"
3604 188 0 16 $tagTablePtr->{$tagID} and $tagTablePtr->{$tagID} eq $tagInfo
3608 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"
3619 3499 0 0 $enc and $enc =~ /base64/
3624 3421 254 53 defined $lang and lc $lang ne "x-default"
3649 3486 0 242 $tagInfo->{'IsDefault'} && $et->{'OPTIONS'}{'XMPAutoConv'}
3652 1214 240 199 $new || $fmt eq 'rational' and &ConvertRational($val)
3657 1344 108 2 $stdDate and $added
3662 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$/
3670 1411 242 0 $new and length $val > 65536
3681 3060 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'}
3687 223 113 3392 $ns and not $tagInfo->{'StaticGroup1'}
3694 3540 188 0 $added and $et->{'OPTIONS'}{'Verbose'}
3707 3726 0 2 $tagInfo->{'SubDirectory'} and not $et->{'IsWriting'}
3711 2 0 0 $tagInfo->{'Encoding'} and $tagInfo->{'Encoding'} eq "Base64"
3825 7699 0 0 $et->{'EXCL_XMP_LOOKUP'} and not $isWriting
7699 0 0 $et->{'EXCL_XMP_LOOKUP'} and not $isWriting and $prop =~ /^(.+):(.*)/
3924 145 208 0 /(.*?):/ and $1 eq $ns
353 0 0 /(.*?):/ and $1 eq $ns and $1 ne $newNS
4012 1 16 0 @$propList > 1 and not $propList->[1] =~ /\b(metadata|desc|title)$/
4068 13 337 10 $stdNS and $stdNS eq 'x' || $stdNS eq 'iX'
4084 2092 341 479 ref $recognizedAttrs{$propName} and $shortVal
4087 247 0 232 defined $et->{'VALUE'}{$name} and $et->{'VALUE'}{$name} eq $tval
4136 3619 1 16 $prop eq "rdf:Description" and $val
4141 3568 65 3 $val eq "" and $attrs =~ /\brdf:(?:value|resource)=(['"])(.*?)\1/ || $attrs =~ /\brdf:about=(['"])(.*?)\1/
4153 3659 0 8 $lastProp eq "rdf:type" and $wasEmpty
3659 0 0 $lastProp =~ /^et:(desc|prt|val)$/ and $count || $1 eq 'desc'
4194 7592 290 4 $processBlankInfo and %{$blankInfo->{'Prop'};}
4239 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'
4244 1 6 0 $stdPath{$et->{'FILE_TYPE'}} && $path ne $stdPath{$et->{'FILE_TYPE'}}
4245 7 0 0 $nonStd and $Image::ExifTool::MWG::strict
4314 0 0 7 defined $fmt and not $fmt
0 6 1 defined $fmt and not $fmt and $buf2 =~ /^[^\n\r]*[\n\r]+<\?aid /s
4351 6 1 0 $isSVG and $et->{'XMP_CAPTURE'}
4371 0 2 0 $ext and $ext eq "MODD"
4376 54 0 3 $isXML and not $hasXMP
54 3 0 $isXML and not $hasXMP and not $isRDF
4381 0 0 0 $ext and $ext eq "COS"
4387 61 0 0 $fast and $fast == 3
4389 57 3 1 $type and $type eq "INX"
4456 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
4462 40 0 0 $blockExtract and $blockExtract > 1
4466 293 0 1 $et->Options("Verbose") and not $et->{'XMP_CAPTURE'}
4478 67 0 3 $$dataPt =~ / $dirStart
67 0 3 $$dataPt =~ / $dirStart and pos $$dataPt < $dirEnd
4523 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'}
4577 0 0 0 $dirInfo->{'DirName'} and $dirInfo->{'DirName'} eq "XMP"
4593 0 227 67 $rtnVal and $dirInfo->{'RAF'}

or 2 conditions

line l !l condition
3041 3652 240 $namespace || ''
3168 59 1757 $fieldInfo->{'List'} || 1
3361 123 1 $5 || ''
3518 22 0 $tagTablePtr->{'NAMESPACE'} || ''
3756 154 10 $et->{'XMPParseOpts'}{'FoundProc'} || \&Image::ExifTool::XMP::FoundXMP
4253 0 7 $et->{'DIR_COUNT'}{'XMP'} || 0
4257 132 101 $dirInfo->{'DirStart'} || 0
4461 2 38 $dirInfo->{'BlockInfo'} || 'XMP'

or 3 conditions

line l !l&&r !l&&!r condition
2867 0 0 0 $str =~ /[\0-\x1f]/ or &Image::ExifTool::IsUTF8(\$str) < 0
2932 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
2937 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
3000 43043 24 31407 $ignoreNamespace{$ns} or $ignoreProp{$prop}
24 0 31407 $ignoreNamespace{$ns} or $ignoreProp{$prop} or $ignoreEtProp{$prop}
3015 0 79 222 $Image::ExifTool::XMP::stdXlatNS{$ns} || $ns
3132 668 4825 0 $fieldInfo->{'FlatName'} || $fieldName
3147 1 32 229 $_ eq "PropertyPath" or defined $flatInfo->{$_}
3168 59 1757 1155 $fieldInfo->{'List'} or $tagInfo->{'List'}
3180 3166 2323 0 $tagInfo->{'RootTagInfo'} || $tagInfo
3234 0 0 0 defined $buff or $raf->Read($buff, 65536)
3286 0 0 0 $make =~ /$mk/i or $alt{$mk} and $make =~ /$alt{$mk}/i
3288 0 0 0 {'Sigma', 'SigmaRaw', 'Leica', 'Panasonic'}->{$mk} || $mk
3293 0 0 0 {'Nikon', 'nikonLensIDs'}->{$mk} || lc($mk) . 'LensTypes'
3309 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)
3346 0 0 0 $printConv->{$id} || "Unknown ($id)"
3454 162 0 0 $ns =~ /^[A-Z_a-z\x80-\xff][-.0-9A-Z_a-z\x80-\xff]*$/ or $ns eq ""
3476 216 11 3501 not $tagInfo or $tagInfo->{'Flat'}
3508 1 0 22 $strTable->{'NAMESPACE'} or not exists $strTable->{'NAMESPACE'}
3515 4 18 0 $xmpNS{$n} || $n
3530 0 0 22 not $sti or $sti->{'Flat'}
3618 0 0 3499 $attrs->{'rdf:datatype'} || $attrs->{'et:encoding'}
3621 0 0 0 length $$val > 100 or $$val =~ /[\0-\x08\x0b\0x0c\x0e-\x1f]/
3650 1411 242 2075 $fmt or $new
3652 242 197 1214 $new || $fmt eq 'rational'
3656 240 170 1044 $new or $fmt eq "date"
3674 1 0 0 $rawVal || $val
3681 151 178 339 @structProps > 1 || defined $structProps[0][1]
3719 0 2 0 $subdir->{'DirName'} || $tagInfo->{'Name'}
3727 2 0 0 &GetTagTable($subdir->{'TagTable'}) || $tagTablePtr
3781 4 3033 8442 not $$dataPt =~ m[<([?/]?)([-\w:.\x80-\xff]+|!--)([^>]*)>]gs or pos $$dataPt > $end
3788 159 0 0 $attrs =~ /--$/ or $$dataPt =~ /-->/gs
3804 0 0 7895 not $$dataPt =~ m[<(/?)$prop([-\w:.\x80-\xff]*)(.*?(/?))>]gs or pos $$dataPt > $end
3826 0 0 0 $Image::ExifTool::XMP::stdXlatNS{$1} || $1
3827 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"}
3904 2 0 48 $curURI->{$ns} or $Image::ExifTool::XMP::nsURI{$ns}
3970 566 71 798 $nItems or grep /^rdf:li /, @$propList
4011 0 0 17 $et->{'OPTIONS'}{'Unknown'} > 1 or $et->{'OPTIONS'}{'Verbose'}
4017 1 1 15 $prop eq "svg" or $prop eq "metadata"
4068 59 10 278 $stdNS eq 'x' || $stdNS eq 'iX'
4081 2707 3 1039 $ignoreNamespace{$ns} or $ignoreProp{$prop}
3 202 837 $ignoreNamespace{$ns} or $ignoreProp{$prop} or $ignoreEtProp{$propName}
4108 635 0 18 not $shorthand or $valEnd != $valStart
4128 107 6309 31 $valStart == $valEnd or not &ParseXMPElement($et, $tagTablePtr, $dataPt, $valStart, $valEnd, $propList, $blankInfo)
4141 15 3 50 $attrs =~ /\brdf:(?:value|resource)=(['"])(.*?)\1/ || $attrs =~ /\brdf:about=(['"])(.*?)\1/
4150 3641 39 17 length $val or not $shorthand
4153 0 0 0 $count || $1 eq 'desc'
4173 0 0 0 $et->{'definedNS'}{$_} or $_ eq "xml"
4239 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'
4258 202 31 0 $dirInfo->{'DirLen'} || length($$dataPt) - $dirStart
4259 203 30 0 $dirInfo->{'DataLen'} || length $$dataPt
4456 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
4478 7 0 287 $isXML or $isRDF
4531 33 0 1 $dirStart or $dirEnd != length $$dataPt
4574 5 0 289 $dirInfo->{'BlockInfo'} or $dirInfo->{'NoStruct'}