Branch Coverage

blib/lib/Music/Tag/File.pm
Criterion Covered Total %
branch 28 58 48.2


line true false branch
35 0 2 if (length $album < 2)
43 2 0 unless ($self->info->has_data('track'))
44 0 2 if ($fname =~ /^[^\d]*(\d+)[^\d]/) { }
54 2 0 unless ($self->info->has_data('title'))
63 2 0 unless ($self->info->has_data('artist'))
67 2 0 unless ($self->info->has_data('album'))
71 2 0 unless ($self->info->has_data('disc'))
76 2 0 if (not $self->info->has_data('picture') or $self->options->{'coveroverwrite'})
80 1 1 if (-e $fname) { }
0 1 elsif (-e $pfname) { }
0 1 elsif (-e $cfname) { }
94 0 0 if (not $self->info->has_data('lyrics') or $self->options->{'lyricsoverwrite'} or length $self->info->lyrics < 10)
99 0 2 if (-e "$fname")
110 4 7 if $f =~ /^\./
112 0 7 if ($f =~ /\.pdf$/i)
113 0 0 unless ($self->info->has_data('booklet'))
127 3 4 if ($f =~ /\.jpg$/i)
128 1 2 unless ($self->info->has_data('picture'))
144 0 0 unless open IN, $fname
161 0 2 if ($picture =~ /\.png$/i)
187 1 0 if (exists $$art{'_Data'})
189 0 1 if ($$art{'MIME type'} eq 'image/png') { }
0 1 elsif ($$art{'MIME type'} eq 'image/bmp') { }
196 0 1 unless (open OUT, ">$filename")
204 4 0 if (defined $s) { }
222 0 0 if ($lyrics)
225 0 0 unless (open OUT, ">$fname")
237 1 0 unless ($self->options('no_savecover'))
240 0 1 unless ($self->options('no_savelyrics') or $self->info->get_data('filename') =~ /\.mp3$/i)