Branch Coverage

blib/lib/Image/ExifTool/IPTC.pm
Criterion Covered Total %
branch 70 108 64.8


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 3 if ($$xlatPtr eq 'bad') { }
1 2 elsif (not $read) { }
2 0 elsif (not $$valPtr =~ /[\x14\x15\x1b]/) { }
1040 81 70 if $isStandardIPTC{$path}
1041 26 44 unless $path =~ /^(\w+)/ and defined $isStandardIPTC{$1}
1062 0 175 if $verbose and $dirInfo
1064 150 25 if ($tagTablePtr eq \%Image::ExifTool::IPTC::Main)
1067 106 44 if (defined $isStd and not $et->{'DIR_COUNT'}{'STD_IPTC'}) { }
1071 80 26 if ($isStd)
1073 80 0 if (eval { do { require Digest::MD5 } }) { }
1074 68 12 if ($pos or $dirLen != length $$dataPt) { }
1086 4 40 if ($Image::ExifTool::MWG::strict || $et->Options('Validate') and $et->{'FILE_TYPE'} =~ /^(JPEG|TIFF|PSD)$/)
1089 4 0 if ($Image::ExifTool::MWG::strict) { }
1106 0 171 if $xlat eq $et->Options("Charset")
1109 0 171 if ($dirLen >= 4 and substr($$dataPt, $pos, 1) ne "\34" and substr($$dataPt, $pos + 3, 1) eq "\34")
1120 35 136 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 2462 unless ($id == 28)
1133 3 0 unless ($id)
1137 3 0 unless $remaining =~ /[^\0]/
1144 0 2462 if ($len & 32768)
1146 0 0 if ($pos + $n > $dirEnd or $n > 8)
1156 0 2462 if ($pos + $len > $dirEnd)
1161 174 2288 if (not defined $lastRec or $lastRec != $rec)
1162 0 0 if ($validate and defined $lastRec and $rec < $lastRec)
1166 0 174 unless ($tableInfo)
1172 0 174 unless ($tableName)
1184 22 2440 unless ($recordPtr->{$tag})
1194 2427 35 if $tagInfo
1195 230 2232 if (not $format) { }
0 2232 elsif ($validate) { }
1197 175 19 if $len <= 4 and $len != 3 and $val =~ /[\0-\x08]/
1200 0 0 if ($format =~ /(.*)\[(\d+)(,(\d+))?\]/) { }
1210 0 0 if ($len < $min or $len > $max)
1211 0 0 $len < $min ? :
0 0 $min == $max ? :
1212 0 0 $len < $siz * $min ? :
1216 2407 55 if ($format)
1217 332 2075 if ($format =~ /^int/) { }
1885 190 elsif ($format =~ /^string/) { }
188 2 elsif ($format =~ /^digits/) { }
0 2 elsif (not $format =~ /^undef/) { }
1218 328 4 if ($len <= 8)
1227 0 1885 if ($val =~ s/\0+$// and $validate)
1230 2 1883 if ($rec == 1) { }
2 1881 elsif ($xlat and $rec < 7 and $val =~ /[\x80-\xff]/) { }
1232 2 0 if $tag == 90
1239 0 188 if ($val =~ s/\0+$// and $validate)
1251 0 2462 if $verbose
1256 2427 35 if $tagInfo