Branch Coverage

blib/lib/Image/MetaData/JPEG/Segment.pm
Criterion Covered Total %
branch 105 118 88.9


line true false branch
23 12 1 if $Image::MetaData::JPEG::show_warnings
76 768 7 defined $dataref ? :
84 1 774 unless defined $name and not ref $name
85 0 774 if defined $dataref and not ref $dataref
120 251 531 if $flag and $flag =~ /NOPARSE/
134 2 3 $_ eq 'EXP' ? :
1 5 $_ eq 'DRI' ? :
3 6 $_ eq 'DNL' ? :
40 9 $_ eq 'SOS' ? :
27 49 /^SOF|DHP/ ? :
2 76 $_ eq 'DAC' ? :
56 78 $_ eq 'DHT' ? :
27 134 $_ eq 'DQT' ? :
117 161 /^(SOI|EOI|RST)$/ ? :
2 278 $_ eq 'APP14' ? :
30 280 $_ eq 'APP13' ? :
2 310 $_ eq 'APP12' ? :
0 312 $_ eq 'APP4' ? :
2 312 $_ eq 'APP3' ? :
25 314 $_ eq 'APP2' ? :
65 339 $_ eq 'APP1' ? :
36 404 $_ eq 'APP0' ? :
91 440 $_ eq 'COM' ? :
149 13 769 if $@
196 0 268 if $name =~ /ECS|Post-EOI/
198 3 265 if $$this{'error'}
200 2 263 unless @{$$this{'records'};}
212 2 261 if $_ eq 'COM'
213 163 98 if $_ eq 'APP1'
214 97 1 if $_ eq 'APP13'
219 2 261 if $length > $Image::MetaData::JPEG::Segment::JPEG_SEG_MAX_LEN
222 5 258 if ($error)
252 0 282 if $length > $Image::MetaData::JPEG::Segment::JPEG_SEG_MAX_LEN and not $name =~ /ECS|Post-EOI/
256 37 245 $name =~ /ECS|Post-EOI/ ? :
259 193 89 unless $name =~ /SOI|EOI|RST|ECS|Post-EOI/
273 0 257 if defined $error
275 227 30 $amarker ? :
0 257 $error ? :
294 0 405 unless ref $records eq 'ARRAY'
304 148 2289 if $_->get_category eq 'p'
330 0 148 unless ref $names eq 'ARRAY'
331 0 148 unless ref $dirref eq 'ARRAY'
350 6412 105 if $required >= 0 and $this->size >= $required
352 101 4 if $required < 0 and $this->size == -$required
354 0 4 defined $message ? :
355 3 1 if $required < 0
383 404 7416 ref $addenda ? :
405 7 14722 unless @_
408 7814 6915 ref $_[$#_] eq 'ARRAY' ? :
449 0 14570 unless $key
457 629 13940 $key eq 'LAST_RECORD' ? :
1 14569 $key eq 'FIRST_RECORD' ? :
459 9598 4972 unless $record and $record->get_category eq 'p'
475 3148 413 $record ? :
495 0 1868 unless $key
500 0 1868 unless $record->get_category eq 'p'
528 23511 14925 unless (ref $dataref)
534 4082 19429 if $length == 0
580 6968 1410 if ref $_[0]