Branch Coverage

blib/lib/Image/ExifTool/IPTC.pm
Criterion Covered Total %
branch 70 112 62.5


line true false branch
983 2 0 if $Image::ExifTool::IPTC::iptcCharset{$val}
998 0 4 unless ($xlat)
999 0 0 if ($val =~ /^\x1b\x25/) { }
1007 4 0 if $xlat eq $et->Options("Charset")
1019 0 5 if ($$xlatPtr eq 'bad') { }
2 3 elsif (not $read) { }
3 0 elsif (not $$valPtr =~ /[\x14\x15\x1b]/) { }
1040 84 70 if $isStandardIPTC{$path}
1041 26 44 unless $path =~ /^(\w+)/ and defined $isStandardIPTC{$1}
1062 0 178 if $verbose and $dirInfo
1064 153 25 if ($tagTablePtr eq \%Image::ExifTool::IPTC::Main)
1067 109 44 if (defined $isStd and not $et->{'DIR_COUNT'}{'STD_IPTC'}) { }
1071 83 26 if ($isStd)
1073 83 0 if (eval { do { require Digest::MD5 } }) { }
1074 71 12 if ($pos or $dirLen != length $$dataPt) { }
1086 4 40 if ($Image::ExifTool::MWG::strict || $validate and $et->{'FILE_TYPE'} =~ /^(JPEG|TIFF|PSD)$/)
1089 4 0 if ($Image::ExifTool::MWG::strict) { }
1106 0 174 if $xlat eq $et->Options("Charset")
1109 0 174 if ($dirLen >= 4 and substr($$dataPt, $pos, 1) ne "\34" and substr($$dataPt, $pos + 3, 1) eq "\34")
1120 35 139 if ($et->{'REQ_TAG_LOOKUP'}{'iptc'} or $et->{'TAGS_FROM_FILE'} and not $et->{'EXCL_TAG_LOOKUP'}{'iptc'})
1123 17 18 if ($pos or $dirLen != length $$dataPt) { }
1132 3 2490 unless ($id == 28)
1133 3 0 unless ($id)
1137 3 0 unless $remaining =~ /[^\0]/
1144 0 2490 if ($len & 32768)
1146 0 0 if ($pos + $n > $dirEnd or $n > 8)
1156 0 2490 if ($pos + $len > $dirEnd)
1161 177 2313 if (not defined $lastRec or $lastRec != $rec)
1162 0 0 if ($validate and defined $lastRec and $rec < $lastRec)
1166 0 177 unless ($tableInfo)
1172 0 177 unless ($tableName)
1184 22 2468 unless ($recordPtr->{$tag})
1190 0 0 if ($validate and not $tagInfo->{'List'} and not $tagInfo->{'Unknown'})
1191 0 0 if $seen{$tagInfo}
1197 2455 35 if $tagInfo
1198 230 2260 if (not $format) { }
0 2260 elsif ($validate) { }
1200 175 19 if $len <= 4 and $len != 3 and $val =~ /[\0-\x08]/
1203 0 0 if ($format =~ /(.*)\[(\d+)(,(\d+))?\]/) { }
1213 0 0 if ($len < $min or $len > $max)
1214 0 0 $len < $min ? :
0 0 $min == $max ? :
1215 0 0 $len < $siz * $min ? :
1219 2435 55 if ($format)
1220 335 2100 if ($format =~ /^int/) { }
1908 192 elsif ($format =~ /^string/) { }
190 2 elsif ($format =~ /^digits/) { }
0 2 elsif (not $format =~ /^undef/) { }
1221 331 4 if ($len <= 8)
1230 0 1908 if ($val =~ s/\0+$// and $validate)
1233 2 1906 if ($rec == 1) { }
3 1903 elsif ($xlat and $rec < 7 and $val =~ /[\x80-\xff]/) { }
1235 2 0 if $tag == 90
1242 0 190 if ($val =~ s/\0+$// and $validate)
1254 0 2490 if $verbose
1259 2455 35 if $tagInfo