Branch Coverage

blib/lib/Image/MetaData/JPEG/Record.pm
Criterion Covered Total %
branch 124 134 92.5


line true false branch
22 1 1 if $Image::MetaData::JPEG::show_warnings
82 3 42032 unless ref $dataref
91 8676 33356 unless defined $endian
101 5108 15856 $count ? :
20964 21067 if $expected == 0
103 10 42021 if $current != $expected
113 26 0 $cat eq 'F' ? :
932 26 $cat eq 'R' ? :
20105 958 $cat eq 'I' ? :
20958 21063 $cat =~ /S|p/ ? :
120 1 42018 if @$tokens == 0
164 48201 20465 unless defined $count
166 1 68665 unless defined $type
167 9 68656 if $type < 0 or $type > $#Image::MetaData::JPEG::Record::JPEG_RECORD_TYPE_LENGTH
189 0 1439 unless defined $dataref
191 194 1245 unless defined $count
194 8 1431 if $count != $new_count
201 0 1431 unless scalar @$tokens == scalar @$new_tokens
206 20 12321 $record->get_category eq 'F' ? :
1 12340 if $record->get_category eq 'F' ? sprintf('%.6g', $$new_tokens[$_]) ne sprintf('%.6g', $$tokens[$_]) : $$new_tokens[$_] ne $$tokens[$_]
231 28999 95 if defined $index or @$values == 1
232 0 95 $this->get_category eq 'S' ? :
238 28858 141 unless defined $index
244 2 28997 if $index > $last_index
261 148 0 unless defined $index
264 0 148 if $index > $last_index
281 14 294 $_[0] >= $msb[$_[1]] ? :
282 17 558 $_[0] < 0 ? :
304 1 21036 unless $endian =~ /$ENDIANNESS_OK/
308 1627 19409 if $endian eq $Image::MetaData::JPEG::Record::LITTLE_ENDIAN
310 323 20713 if $this->is($Image::MetaData::JPEG::Record::NIBBLES)
314 200 20836 if $this->is_signed
329 1 9351 unless $endian =~ /$ENDIANNESS_OK/
333 409 8942 if $this->is_signed
337 3 9348 if $this->is($Image::MetaData::JPEG::Record::NIBBLES)
340 127 9224 if $endian eq $Image::MetaData::JPEG::Record::LITTLE_ENDIAN
359 1 25 unless $endian =~ /$ENDIANNESS_OK/
363 17 8 if $endian ne $Image::MetaData::JPEG::Record::NATIVE_ENDIANNESS
382 1 30 unless $endian =~ /$ENDIANNESS_OK/
390 24 6 if $endian ne $Image::MetaData::JPEG::Record::NATIVE_ENDIANNESS
409 4249 11113 unless defined $endian
420 31 0 $category eq 'F' ? :
2025 31 $category eq 'R' ? :
7327 2056 $category eq 'I' ? :
5979 9383 $category =~ /S|p/ ? :
428 5979 9381 $category =~ /S|p/ ? :
430 9757 5603 wantarray ? :
461 156 10490 if length($token) + length($string) > $maxlen
468 493 477 if $dropnull
471 156 814 $left ? :
486 0 2439 unless defined $names
492 1622 817 if ($descriptor =~ /^\d*$/)
500 0 1512 !defined($$section_hash{$descriptor}) ? :
110 1512 !exists($$section_hash{$descriptor}) ? :
507 17 2422 if length $descriptor > $maxlen
513 1622 817 defined $numerictag ? :
518 105 2334 if defined $$this{'extra'}
523 45 2394 $extra > 0 ? :
525 61 2378 $this->is_signed ? :
526 493 1946 $this->is($Image::MetaData::JPEG::Record::ASCII) ? :
534 674 2719 $f eq ' ' ? :
538 898 0 $category eq 'R' ? :
24 898 $category eq 'F' ? :
1353 922 $category eq 'I' ? :
970 2275 $category eq 'S' ? :
148 3245 $category eq 'p' ? :
547 45 2394 if $extra > 0