Branch Coverage

blib/lib/MPEG/ID3v2Tag.pm
Criterion Covered Total %
branch 77 170 45.2


line true false branch
38 0 6 if ($newframes)
39 0 0 unless ref($newframes) =~ /ARRAY/
43 3 3 if (wantarray) { }
62 0 0 if (defined $frameocc) { }
63 0 0 unless $_->frameid ne $frameid
95 0 3 if ($self->flag_unsynchronization and $body =~ /\xff$/)
96 0 0 unless $$self{'PADDING_SIZE'}
99 1 2 if ($self->flag_extended_header)
107 0 3 if ($self->flag_unsynchronization)
111 0 0 if (exists $$self{'ORIGINAL_SIZE'} and $$self{'PADDING_SIZE'} and not $$self{'MANUAL_PADDING'})
116 0 0 if ($padlen >= 0)
121 1 2 if ($$self{'PADDING_SIZE'})
141 1 0 if $size
212 6 16 if (length $frame == 4 and @args)
220 0 6 unless ($package->can('new'))
225 0 6 if ($@)
232 0 22 unless ($frame->isa('MPEG::ID3Frame'))
251 0 0 if (wantarray) { }
261 3 3 if (@_)
4 9 if (@_)
3 12 if (@_)
288 3 0 if (ref $fh eq 'GLOB') { }
290 0 3 unless defined $readlen
291 0 3 if ($readlen < 10)
298 0 0 if ($place < 0)
313 0 3 if ($id3 ne 'ID3')
317 0 3 if ($$tag{'MAJORVER'} < 3)
328 3 0 if (ref $fh eq 'GLOB') { }
333 0 3 unless defined $readlen
334 0 3 if $readlen == 0
344 0 3 if $tag->flag_unsynchronization
348 1 2 if ($tag->flag_extended_header)
367 0 1 if ($$tag{'PADDING_SIZE'})
450 4 0 if $$self{'FROM_PARSER'}
461 0 11 if ($self->flag_encryption or $self->flag_grouping_identity)
471 0 11 if ($self->flag_compression and not exists $$self{'UNSUPPORTED_BODY'}) { }
480 0 0 unless defined $compressed_data
504 0 0 if ($$self{'FROM_PARSER'} and exists $$self{'UNSUPPORTED_BODY'})
531 15 37 if (defined $value) { }
15 37 if (defined $value) { }
15 11 if (defined $value) { }
15 37 if (defined $value) { }
15 11 if (defined $value) { }
15 11 if (defined $value) { }
552 0 0 if (defined $value) { }
556 0 0 if (exists $$self{'FLAGS'}{'flag_file_alter'}) { }
621 6 9 if (defined $tag and $$tag{'MAJORVER'} == 4)
635 0 15 if ($self->flag_encryption or $self->flag_grouping_identity)
646 0 15 if ($self->flag_compression)
651 0 0 if ($@)
662 0 0 if (not defined $body or length $body != $uc_size)
664 0 0 if (defined $body) { }
682 11 4 if ($frame_package->can('parse_data')) { }
686 0 11 if ($$self{'UNSUPPORTED_BODY'})
717 0 0 if ($$self{'UNSUPPORTED_BODY'}) { }
749 5 0 if (@_ == 1) { }
0 0 elsif (@_ == 2) { }
777 2 6 if ($$self{'ENCODING'} == 0) { }
6 0 elsif ($$self{'ENCODING'} == 1) { }
0 0 elsif ($$self{'ENCODING'} == 2) { }
0 0 elsif ($$self{'ENCODING'} == 3) { }
785 0 6 if ($$self{'BOM'} == 65279) { }
823 0 27 if ($frameid eq 'Text' or $frameid eq 'Url')
963 0 0 if length $language != 3
1027 0 4 if ($arg =~ /^-encoding/) { }
0 4 elsif ($arg =~ /^-mime/) { }
2 2 elsif ($arg =~ /^-picture_type/ or $arg =~ /-type/) { }
0 2 elsif ($arg =~ /^-desc/) { }
0 2 elsif ($arg =~ /^-fh/) { }
2 0 elsif ($arg =~ /^-fn/ or $arg =~ /^-file/) { }
0 0 elsif ($arg =~ /^-data/ or $arg =~ /^-data/) { }
1053 0 2 if @_
1055 2 0 unless (exists $$self{'MIMETYPE'})
1056 2 0 if ($fname)
1057 2 0 if ($fname =~ /\.gif$/i) { }
0 0 elsif ($fname =~ /\.jpg/) { }
1065 0 2 unless (exists $$self{'MIMETYPE'})
1069 2 0 unless (exists $$self{'DATA'})
1070 2 0 unless (defined $fh)
1071 0 2 unless defined $fname
1105 0 0 if length $language != 3
1134 0 0 if length $language != 3
1153 2 0 if ($$self{'ENCODING'} == 0) { }
0 0 elsif ($$self{'ENCODING'} == 1) { }
1164 0 0 if ($$self{'BOM'} == 65279) { }