Branch Coverage

blib/lib/MP3/Tag/CDDB_File.pm
Criterion Covered Total %
branch 67 98 68.3


line true false branch
51 85 0 if ref $filename
64 36 183 if -r $f
66 49 36 unless $found
68 0 36 unless open F, "< $found"
69 0 0 if ($e = $h->get_config("decode_encoding_cddb_file") and $e->[0])
73 0 36 unless close F
124 26 0 if (defined $what)
125 3 23 if $what =~ /^artist_collection/i
126 0 23 if $what =~ /^title_track/i
127 2 21 if $what =~ /^comment_track/i
128 1 20 if $what =~ /^comment_collection/i
129 0 20 if $what =~ /^cddb_id/i
130 2 18 if $what =~ /^al/i
131 4 14 if $what =~ /^a/i
132 0 14 if $what =~ /^tr/i
133 3 11 if $what =~ /^y/i
134 3 8 if $what =~ /^c/i
135 2 6 if $what =~ /^g/i
139 0 0 unless wantarray
147 0 8 if $self->{'fields'}
149 160 224 unless $l =~ /^\s*(\w+)\s*=(\s*(.*))/
151 224 0 unless exists $self->{'fields'}{$1}
153 176 48 if $1 =~ /\d+$/
160 18 8 if exists $self->{'parsed'}
165 8 0 if ($track)
170 8 0 if defined $t1
171 0 8 unless defined $t
172 8 0 if defined $t2
173 6 2 unless defined $tt
174 0 8 if defined $a and $a =~ /^\s*(<<\s*)?(Various Artists|compilation disc)\s*(>>\s*)?$/i
176 0 8 if defined $aa and $aa =~ /^\s*(<<\s*)?(Various Artists|compilation disc)\s*(>>\s*)?$/i
178 2 6 if defined $a and length $a and defined $aa and length $aa
179 6 2 unless defined $aa and length $aa
181 0 8 unless defined $tt and length $tt
185 16 0 if (defined $f and length $f)
188 1 5 if $2 and not $y
189 3 0 unless $2 or $cat
191 2 14 if ($f =~ s[ ((^|[;,.]|\s+-\s) # 1,2 \s* (Recorded (\s+[io]n)? \s* (:\s*)? )? # 3, 4, 5 (\d{4}([-,][-\d\/,]+)?) # 6, 7 \b \s* (?: [.;] \s* )? ((?:[;.,]|\s-\s|$)\s*)) # 8 ][($self->{'parent'}->get_config('comment_remove_date')->[0] && !($2 && $8) ? "" : $1) . ($2 && $8 ? $8 : "");]eimx and not $2 && $8)
199 1 1 $self->{'parent'}->get_config('comment_remove_date')->[0] && !($2 && $8) ? :
0 2 $2 && $8 ? :
204 0 0 if $3 or $7 or not $y or $c2 and $f eq $c2
208 0 16 unless length $f
212 8 0 if (defined $c2 and length $c2)
213 8 0 if (defined $c1 and length $c1 and $c1 ne substr($c2, 0, length $c1) and $c1 ne substr($c2, -length($c1))) { }
217 0 8 "$c1$c2" =~ /\n/ ? :
223 3 5 if (defined $cat and $cat =~ /^\d+$/)
225 3 0 if $cat < scalar @MP3::Tag::ID3v1::winamp_genres
282 0 19 if defined $self->{'track'}
283 9 10 if $self->{'recursive'} or not $self->parent_ok