Branch Coverage

blib/lib/Image/IPTCInfo.pm
Criterion Covered Total %
branch 86 182 47.2


line true false branch
135 0 5 if ($input_is_handle and not $file->isa('IO::Seekable'))
143 1 4 $input_is_handle ? :
144 0 5 unless ($handle)
153 0 5 unless ($datafound or defined $force)
157 0 0 unless $input_is_handle
168 4 1 unless $input_is_handle
171 5 0 if $datafound
173 4 1 unless $input_is_handle
216 2 0 $$self{'_filename'} ? :
217 0 2 unless ($handle)
226 0 2 unless (FileIsJPEG($handle))
235 0 2 if ($ret == 0)
241 2 0 if ($$self{'_filename'}) { }
243 0 2 unless ($handle = 'IO::File'->new($newfile, '>'))
249 0 0 unless ($handle->truncate(0))
257 0 2 if (defined $options and defined $$options{'discardAdobeParts'})
267 2 0 if $$self{'_filename'}
409 0 0 if (ref $add eq 'ARRAY') { }
445 0 0 unless length $basetag
465 0 0 if (defined $self->Keywords)
478 0 0 if (defined $self->SupplementalCategories)
491 0 0 if (defined $self->Contacts)
508 0 0 if (length $filename)
541 0 0 if $tablename eq undef or $mappingsRef eq undef
586 5 0 if (FileIsJPEG($handle)) { }
611 0 7 if ($debugMode)
622 0 7 unless $handle->read($ff, 1)
625 0 7 unless ord $ff == 255 and ord $soi == 216
635 0 7 unless ord $ff == 255
661 0 5 unless $handle->read($ff, 1)
664 0 5 unless (ord $ff == 255 and ord $soi == 216)
676 0 5 if (ord $marker == 0)
679 0 5 if (ord $marker == 217)
683 0 5 if (ord $marker == 218)
687 0 5 if (JPEGSkipVariable($handle) == 0)
712 0 14 unless $handle->read($byte, 1)
716 0 0 unless $handle->read($byte, 1)
722 0 14 unless $handle->read($byte, 1)
744 0 14 unless $handle->read($length, 2)
751 0 14 if ($length < 2)
774 0 9 if $length == 0
778 4 5 if (defined $rSave or $debugMode) { }
780 0 4 unless ($handle->read($temp, $length))
792 0 5 unless ($handle->seek($length, 1))
799 4 5 if defined $rSave
826 0 135 unless ($handle->read($temp, 1))
833 5 130 if (ord $temp == 28)
841 5 0 if (ord $record == 2) { }
881 0 90 unless $handle->read($header, 5)
886 5 85 unless $tag == 28 and $record == 2
899 20 65 if (exists $listdatasets{$dataset}) { }
60 5 elsif (exists $datasets{$dataset}) { }
935 0 2 if (defined $options and defined $$options{'discardAppParts'})
943 0 2 unless $handle->read($ff, 1)
946 0 2 unless (ord $ff == 255 and ord $soi == 216)
962 0 2 if (JPEGSkipVariable($handle, \$app0data) == 0)
966 2 0 if (ord $marker == 224 or not $discardAppParts) { }
993 0 2 if (ord $marker == 0)
997 0 2 if (ord $marker == 217)
1005 0 2 if (ord $marker == 218)
1013 0 2 if (JPEGSkipVariable($handle, \$partdata) == 0)
1019 0 2 if ($discardAppParts and ord $marker >= 224 and ord $marker <= 239) { }
2 0 elsif (ord $marker == 237) { }
1080 0 24 unless ($offset += 6) < $length
1086 0 24 unless ++$offset < $length
1093 0 24 if $stringlen % 2 != 0
1095 24 0 if $stringlen == 0
1096 0 24 unless $offset < $length
1100 0 24 unless ($offset += 4) < $length
1106 5 19 if $size % 2 != 0
1109 22 2 unless ($id1 == 4 and $id2 == 4)
1114 22 0 if $stringlen == 0 or $stringlen % 2 != 0
1117 4 18 if $size % 2 != 0 and length($out) % 2 != 0
1137 1 1 unless (scalar keys %datanames)
1147 1 1 unless (scalar keys %listdatanames)
1166 0 24 if ($dataset == 0)
1169 0 24 unless $value
1182 0 4 if ($dataset == 0)
1187 0 8 unless $value
1223 2 0 if length($data) % 2 != 0
1225 2 0 if defined $otherparts
1243 0 43 if ($debugMode)
1265 0 0 if (ord $temp >= 33 and ord $temp <= 126) { }
1270 0 0 if ($offset % 16 == 0)
1277 0 0 if (defined $dcol1 or defined $dcol2)
1293 0 0 unless $handle
1297 0 0 unless $handle->read($ff, 1)
1300 0 0 unless (ord $ff == 255 and ord $soi == 216)
1312 0 0 if (ord $marker == 0)
1315 0 0 if (ord $marker == 217)
1318 0 0 if (JPEGSkipVariable($handle) == 0)