Branch Coverage

blib/lib/Image/MetaData/JPEG/access/app13.pl
Criterion Covered Total %
branch 103 112 91.9


line true false branch
28 22 47 unless defined $index
32 14 53 if $index == -1
34 45 8 exists $references[$index] ? :
52 61 9 if @what_refs
57 5 4 @refs ? :
61 4 5 unless ($app13_segment)
91 3 7 if $index == -1
98 1 9 unless defined $_
100 4 5 if scalar @{$$_{'records'};} <= 1
121 0 22 unless defined $segment
164 553 2081 unless defined $_[1]
165 2628 6 $_[1] =~ /^($_[3])$/ ? :
191 1588 433 unless $$this{'name'} eq 'APP13'
194 2 431 unless $id and grep {/^$id$/;} @$Image::MetaData::JPEG::Segment::APP13_PHOTOSHOP_IDS
196 114 317 unless defined $what
198 281 36 if defined $this->search_record(subdir_name($what))
213 10 166 unless $this->is_app13_ok($what)
235 0 88 unless $this->is_app13_ok(undef)
239 78 10 if defined $subdir
244 8 2 if $mandatory
263 0 9 unless $this->is_app13_ok($what)
308 0 88 unless $records
319 22 66 unless ($what =~ /IPTC/)
324 22 66 if $type eq 'TEXTUAL'
325 244 8 defined $match ? :
377 1 78 unless ref $data eq 'HASH'
379 2 76 if not $what =~ /IPTC/ and $action eq 'UPDATE'
387 30 48 $action eq 'REPLACE' ? :
394 274 35 unless exists $$data_accepted{$tag}
399 10 25 if @$newarrayref and $action eq 'UPDATE' || !($what =~ /IPTC/)
406 65 13 if (my $mandatory = JPEG_lookup('APP13', $subdir, '__mandatory'))
409 0 65 if %$impossible
411 27 38 unless exists $$data_accepted{$tag}
435 131 330 if (not $what =~ /IPTC/) { }
330 0 elsif ($what =~ /^IPTC/) { }
441 118 13 if exists $$arrayref[1]
474 107 156 ref $value ? :
477 198 65 if (defined $tag and not $tag =~ /^\d*$/)
479 191 7 if defined $num_tag
482 226 37 value_is_OK($tag, $value, $what) ? :
485 262 1 unless exists $$repository{$tag}
505 215 246 unless $constraints and $$constraints[1] eq 'N'
507 16 230 if @$arrayref != 1
519 0 263 unless defined $tag
521 7 256 unless $tag =~ /^\d*$/
523 0 256 unless ref $arrayref and ref $arrayref eq 'ARRAY'
525 3 253 unless @$arrayref
527 6 247 unless JPEG_lookup('APP13', subdir_name($what), $tag)
529 1 246 if not $what =~ /IPTC/ and scalar @$arrayref > 2
532 0 246 unless defined $constraints
534 4 242 if $$constraints[1] eq 'N' and @$arrayref != 1
538 3 239 if $regex =~ /invalid/
542 14 277 if not $what =~ /IPTC/ and ($_ || 1) ne ($$arrayref[0] || 1)
544 2 275 unless defined $_
546 3 272 if length $_ < $$constraints[2] or length $_ > $$constraints[3]
550 8 264 unless /$regex/ or $regex =~ /binary/