Condition Coverage

blib/lib/Image/ExifTool/XMP.pm
Criterion Covered Total %
condition 256 485 52.7


and 2 conditions

line l !l condition
3110 0 0 $_ eq "undef" and $_ = undef
3294 0 22 $tagInfo = $tagTablePtr->{$tagID} and last NoLoop

and 3 conditions

line !l l&&!r l&&r condition
2664 4 150 0 $enc and $enc ne "UTF8"
2701 0 1 0 $trunc and $pos + $n > length $$strPt
2706 38 39 0 $ch == 224 and (ord $1 & 224) == 128
77 0 0 $ch == 237 and (ord $1 & 224) == 160
76 1 0 $ch == 239 and ord $1 == 191
77 0 0 $ch == 239 and ord $1 == 191 and (ord substr($1, 1) & 254) == 190
2711 75 0 0 $ch == 240 and (ord $1 & 240) == 128
75 0 0 $ch == 244 and ord $1 > 143
2734 0 0 25 $ch >= 194 and $ch < 248
2739 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
2744 0 0 0 $ch == 240 and (ord $1 & 240) == 128
0 0 0 $ch == 244 and ord $1 > 143
2812 35401 2321 878 $structProps and @$structProps
37722 439 439 $structProps and @$structProps and $prop =~ /^rdf:li (\d+)$/
2825 237 0 55 ref $info eq "HASH" and $info->{'SubDirectory'}
2828 237 40 15 $table and $table->{$nm}
2873 22 6 0 $Image::ExifTool::XMP::nsURI{$ns} and $Image::ExifTool::XMP::nsURI{$ns} ne $nsRef->{$ns}
2902 0 0 0 ref $tagInfo eq "HASH" and $tagInfo->{'Struct'}
2936 4591 214 44 $fieldInfo->{'Struct'} and $noSubStruct
2978 4624 0 177 $fieldInfo->{'Groups'} and $fieldInfo->{'Groups'}{'2'}
4540 84 0 $strTable->{'GROUPS'} and $strTable->{'GROUPS'}{'2'}
3008 8 0 99 $tagInfo->{'Writable'} and $tagInfo->{'Writable'} eq "lang-alt"
3091 0 0 0 $alt{$mk} and $make =~ /$alt{$mk}/i
3114 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)
3130 0 0 0 $mk eq "Pentax" and $id =~ /^\d+$/
3165 231 0 73 not $unsure and $val =~ /^(\d{4})(-\d{2}){0,2}/
3230 4 0 0 $tag eq "id" and $props->[1] eq "svg:metadata"
3241 3416 4 203 not $ns and $grp0 ne "XMP"
3416 0 4 $grp0 eq "XML" and not $table
3291 0 0 45 ref $ti eq "HASH" and $ti->{'Struct'}
3331 0 0 22 ref $tg eq "HASH" and $tg->{'SubDirectory'}
3343 0 0 0 ref $ti3 eq "HASH" and $ti3->{'Struct'}
3372 72 46 78 $et->{'curURI'}{$ns} and $et->{'curURI'}{$ns} =~ m[^http://ns.exiftool.(?:ca|org)/(.*?)/(.*?)/]
3388 8 171 17 @$props > 2 and $props->[-1] =~ /^rdf:li \d+$/
179 0 17 @$props > 2 and $props->[-1] =~ /^rdf:li \d+$/ and $props->[-2] =~ /^rdf:(Bag|Seq|Alt)$/
3391 5 0 12 $lang and $1 eq "Alt"
3403 189 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"
3412 3419 0 1 $enc and $enc =~ /base64/
3417 3318 252 53 defined $lang and lc $lang ne "x-default"
3442 3387 0 236 $tagInfo->{'IsDefault'} && $et->{'OPTIONS'}{'XMPAutoConv'}
3445 1195 234 199 $new || $fmt eq 'rational' and &ConvertRational($val)
3450 1628 0 0 $et->{'XmpValidate'} and $fmt
1628 0 0 $et->{'XmpValidate'} and $fmt and $fmt eq "boolean"
3454 1392 236 0 $new and length $val > 65536
3461 2955 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'}
3467 207 109 3307 $ns and not $tagInfo->{'StaticGroup1'}
3491 3623 0 0 $tagInfo->{'SubDirectory'} and not $et->{'IsWriting'}
3495 0 0 0 $tagInfo->{'Encoding'} and $tagInfo->{'Encoding'} eq "Base64"
3606 7505 0 0 $et->{'EXCL_XMP_LOOKUP'} and not $isWriting
7505 0 0 $et->{'EXCL_XMP_LOOKUP'} and not $isWriting and $prop =~ /^(.+):(.*)/
3684 145 187 0 /(.*?):/ and $1 eq $ns
332 0 0 /(.*?):/ and $1 eq $ns and $1 ne $newNS
3772 1 15 0 @$propList > 1 and not $propList->[1] =~ /\b(metadata|desc|title)$/
3828 12 319 10 $stdNS and $stdNS eq 'x' || $stdNS eq 'iX'
3842 2015 323 466 ref $recognizedAttrs{$propName} and $shortVal
3845 235 0 231 defined $et->{'VALUE'}{$name} and $et->{'VALUE'}{$name} eq $tval
3894 3545 0 16 $prop eq "rdf:Description" and $val
3899 3496 63 2 $val eq "" and $attrs =~ /\brdf:(?:value|resource)=(['"])(.*?)\1/ || $attrs =~ /\brdf:about=(['"])(.*?)\1/
3911 3580 0 8 $lastProp eq "rdf:type" and $wasEmpty
3580 0 0 $lastProp =~ /^et:(desc|prt|val)$/ and $count || $1 eq 'desc'
3952 7403 272 4 $processBlankInfo and %{$blankInfo->{'Prop'};}
3997 288 2 9 $Image::ExifTool::MWG::strict || $et->{'OPTIONS'}{'Validate'} and not $et->{'XMP_CAPTURE'} || $et->{'DOC_NUM'}
290 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'
4002 1 6 0 $stdPath{$et->{'FILE_TYPE'}} && $path ne $stdPath{$et->{'FILE_TYPE'}}
4003 7 0 0 $nonStd and $Image::ExifTool::MWG::strict
4061 0 0 7 defined $fmt and not $fmt
0 6 1 defined $fmt and not $fmt and $buf2 =~ /^[^\n\r]*[\n\r]+<\?aid /s
4098 6 1 0 $isSVG and $et->{'XMP_CAPTURE'}
4118 0 2 0 $ext and $ext eq "MODD"
4123 53 0 3 $isXML and not $hasXMP
53 3 0 $isXML and not $hasXMP and not $isRDF
4128 0 0 0 $ext and $ext eq "COS"
4134 60 0 0 $fast and $fast == 3
4136 56 3 1 $type and $type eq "INX"
4203 231 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
4209 40 0 0 $blockExtract and $blockExtract > 1
4213 275 0 1 $et->Options("Verbose") and not $et->{'XMP_CAPTURE'}
4225 66 0 1 $$dataPt =~ / $dirStart
66 0 1 $$dataPt =~ / $dirStart and pos $$dataPt < $dirEnd
4265 268 8 0 $et->{'XMP_NO_XPACKET'} and $et->{'OPTIONS'}{'Validate'}
8 0 0 $et->{'XMP_NO_XPACKET'} and $et->{'OPTIONS'}{'Validate'} and $stdPath{$et->{'FILE_TYPE'}}
8 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'}
4319 0 0 0 $dirInfo->{'DirName'} and $dirInfo->{'DirName'} eq "XMP"
4335 0 210 66 $rtnVal and $dirInfo->{'RAF'}

or 2 conditions

line l !l condition
2848 3557 224 $namespace || ''
2974 59 1569 $fieldInfo->{'List'} || 1
3166 118 1 $5 || ''
3322 22 0 $tagTablePtr->{'NAMESPACE'} || ''
3537 154 0 $et->{'XMPParseOpts'}{'FoundProc'} || \&Image::ExifTool::XMP::FoundXMP
4011 0 7 $et->{'DIR_COUNT'}{'XMP'} || 0
4015 125 91 $dirInfo->{'DirStart'} || 0
4208 2 38 $dirInfo->{'BlockInfo'} || 'XMP'

or 3 conditions

line l !l&&r !l&&!r condition
2623 0 0 0 $str =~ /[\0-\x1f]/ or &IsUTF8(\$str) < 0
2686 2 0 153 $ch < 194 or $ch >= 248
2706 0 0 77 $ch == 224 and (ord $1 & 224) == 128 or $ch == 237 and (ord $1 & 224) == 160
0 0 77 $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 0 75 $ch == 240 and (ord $1 & 240) == 128 or $ch == 244 and ord $1 > 143
0 0 75 $ch == 240 and (ord $1 & 240) == 128 or $ch == 244 and ord $1 > 143 or $ch > 244
2739 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
2744 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
2807 38600 0 27461 $ignoreNamespace{$ns} or $ignoreProp{$prop}
2822 0 70 222 $Image::ExifTool::XMP::stdXlatNS{$ns} || $ns
2939 636 4169 0 $fieldInfo->{'FlatName'} || $fieldName
2954 1 32 226 $_ eq "PropertyPath" or defined $flatInfo->{$_}
2974 59 1569 985 $fieldInfo->{'List'} or $tagInfo->{'List'}
2986 2708 2093 0 $tagInfo->{'RootTagInfo'} || $tagInfo
3039 0 0 0 defined $buff or $raf->Read($buff, 65536)
3091 0 0 0 $make =~ /$mk/i or $alt{$mk} and $make =~ /$alt{$mk}/i
3093 0 0 0 {'Sigma', 'SigmaRaw', 'Leica', 'Panasonic'}->{$mk} || $mk
3098 0 0 0 {'Nikon', 'nikonLensIDs'}->{$mk} || lc($mk) . 'LensTypes'
3114 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)
3151 0 0 0 $printConv->{$id} || "Unknown ($id)"
3258 157 0 0 $ns =~ /^[A-Z_a-z\x80-\xff][-.0-9A-Z_a-z\x80-\xff]*$/ or $ns eq ""
3280 207 11 3405 not $tagInfo or $tagInfo->{'Flat'}
3312 1 0 22 $strTable->{'NAMESPACE'} or not exists $strTable->{'NAMESPACE'}
3319 4 18 0 $xmpNS{$n} || $n
3334 0 0 22 not $sti or $sti->{'Flat'}
3411 1 0 3419 $attrs->{'rdf:datatype'} || $attrs->{'et:encoding'}
3414 1 0 0 length $$val > 100 or $$val =~ /[\0-\x08\x0b\0x0c\x0e-\x1f]/
3443 1392 236 1995 $fmt or $new
3445 236 197 1195 $new || $fmt eq 'rational'
3448 234 166 1029 $new or $fmt eq "date"
3461 151 178 339 @structProps > 1 || defined $structProps[0][1]
3488 1 0 0 $rawVal || $val
3502 0 0 0 $subdir->{'DirName'} || $tagInfo->{'Name'}
3508 0 0 0 &GetTagTable($subdir->{'TagTable'}) || $tagTablePtr
3562 1 2968 8219 not $$dataPt =~ m[<([?/]?)([-\w:.\x80-\xff]+|!--)([^>]*)>]gs or pos $$dataPt > $end
3569 158 0 0 $attrs =~ /--$/ or $$dataPt =~ /-->/gs
3585 0 0 7706 not $$dataPt =~ m[<(/?)$prop([-\w:.\x80-\xff]*)(.*?(/?))>]gs or pos $$dataPt > $end
3607 0 0 0 $Image::ExifTool::XMP::stdXlatNS{$1} || $1
3608 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"}
3664 2 0 44 $curURI->{$ns} or $Image::ExifTool::XMP::nsURI{$ns}
3730 560 71 780 $nItems or grep /^rdf:li /, @$propList
3771 0 0 16 $et->{'OPTIONS'}{'Unknown'} > 1 or $et->{'OPTIONS'}{'Verbose'}
3777 1 1 14 $prop eq "svg" or $prop eq "metadata"
3828 55 10 264 $stdNS eq 'x' || $stdNS eq 'iX'
3839 2804 0 802 $ignoreNamespace{$ns} or $ignoreProp{$prop}
3866 625 0 18 not $shorthand or $valEnd != $valStart
3886 102 6159 22 $valStart == $valEnd or not &ParseXMPElement($et, $tagTablePtr, $dataPt, $valStart, $valEnd, $propList, $blankInfo)
3899 15 2 48 $attrs =~ /\brdf:(?:value|resource)=(['"])(.*?)\1/ || $attrs =~ /\brdf:about=(['"])(.*?)\1/
3908 3562 39 13 length $val or not $shorthand
3911 0 0 0 $count || $1 eq 'desc'
3931 0 0 0 $et->{'definedNS'}{$_} or $_ eq "xml"
3997 11 0 288 $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'
4016 189 27 0 $dirInfo->{'DirLen'} || length($$dataPt) - $dirStart
4017 190 26 0 $dirInfo->{'DataLen'} || length $$dataPt
4203 27 0 231 $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
4225 7 0 269 $isXML or $isRDF
4273 33 0 1 $dirStart or $dirEnd != length $$dataPt
4316 5 0 271 $dirInfo->{'BlockInfo'} or $dirInfo->{'NoStruct'}