| blib/lib/WebService/FreeDB.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % | 
| branch | 30 | 174 | 17.2 | 
| line | true | false | branch | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 24 | 2 | 0 | unless (defined $$self{'ARG'}{'HOST'}) | |||||||||||||||||||||||||||||||||||||||
| 28 | 2 | 0 | unless (defined $$self{'ARG'}{'PATH'}) | |||||||||||||||||||||||||||||||||||||||
| 31 | 2 | 0 | unless (defined $$self{'ARG'}{'PROXY'}) | |||||||||||||||||||||||||||||||||||||||
| 35 | 2 | 0 | unless (defined $$self{'ARG'}{'DEFAULTVALUES'}) | |||||||||||||||||||||||||||||||||||||||
| 40 | 2 | 0 | $self ? : | |||||||||||||||||||||||||||||||||||||||
| 54 | 0 | 1 | if (defined $_[1]) | |||||||||||||||||||||||||||||||||||||||
| 68 | 0 | 2 | unless ($field =~ /^(artist|title|track|rest)$/) | |||||||||||||||||||||||||||||||||||||||
| 69 | 0 | 0 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 1) | |||||||||||||||||||||||||||||||||||||||
| 77 | 0 | 1 | if (@cats) { } | |||||||||||||||||||||||||||||||||||||||
| 80 | 0 | 0 | unless ($cat =~ /^(blues|classical|country|data|folk|jazz|misc|newage|reggae|rock|soundtrack)$/) | |||||||||||||||||||||||||||||||||||||||
| 81 | 0 | 0 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 1) | |||||||||||||||||||||||||||||||||||||||
| 93 | 0 | 1 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 2) | |||||||||||||||||||||||||||||||||||||||
| 101 | 1 | 0 | if ($response->is_success) { } | |||||||||||||||||||||||||||||||||||||||
| 104 | 0 | 1 | unless $line | |||||||||||||||||||||||||||||||||||||||
| 125 | 0 | 1 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 2) | |||||||||||||||||||||||||||||||||||||||
| 132 | 1 | 0 | if ($response->is_success) { } | |||||||||||||||||||||||||||||||||||||||
| 134 | 0 | 1 | unless (defined $data) | |||||||||||||||||||||||||||||||||||||||
| 135 | 0 | 0 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 1) | |||||||||||||||||||||||||||||||||||||||
| 146 | 0 | 234 | unless @lines | |||||||||||||||||||||||||||||||||||||||
| 148 | 0 | 1 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 2) | |||||||||||||||||||||||||||||||||||||||
| 151 | 0 | 1 | unless $line | |||||||||||||||||||||||||||||||||||||||
| 152 | 0 | 1 | if ($line =~ m[/id="searchU11" title="(.+?) / (.+?)">]) { } | |||||||||||||||||||||||||||||||||||||||
| 156 | 0 | 1 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 1) | |||||||||||||||||||||||||||||||||||||||
| 160 | 1 | 0 | if ($line =~ m[Tracks:\s*?(\d+) ]) { } | |||||||||||||||||||||||||||||||||||||||
| 163 | 0 | 0 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 1) | |||||||||||||||||||||||||||||||||||||||
| 167 | 1 | 0 | if ($line =~ m[Total time:\s*(\d+:\d+) ]) { } | |||||||||||||||||||||||||||||||||||||||
| 170 | 0 | 0 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 1) | |||||||||||||||||||||||||||||||||||||||
| 174 | 1 | 0 | if ($line =~ m[Year:\s*(\d*) ]) { } | |||||||||||||||||||||||||||||||||||||||
| 177 | 0 | 0 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 1) | |||||||||||||||||||||||||||||||||||||||
| 181 | 1 | 0 | if ($line =~ m[Disc-ID:\s*(.*?) / ]) { } | |||||||||||||||||||||||||||||||||||||||
| 184 | 0 | 0 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 1) | |||||||||||||||||||||||||||||||||||||||
| 188 | 1 | 0 | unless (defined $disc{'artist'}) | |||||||||||||||||||||||||||||||||||||||
| 189 | 1 | 0 | unless (defined $disc{'album'}) | |||||||||||||||||||||||||||||||||||||||
| 190 | 0 | 1 | unless (defined $disc{'year'}) | |||||||||||||||||||||||||||||||||||||||
| 191 | 0 | 1 | unless (defined $disc{'genre'}) | |||||||||||||||||||||||||||||||||||||||
| 194 | 0 | 63 | if ($line =~ /^ 
 | |||||||||||||||||||||||||||||||||||||||
| 216 | 0 | 0 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 3) | |||||||||||||||||||||||||||||||||||||||
| 222 | 0 | 0 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 1) | |||||||||||||||||||||||||||||||||||||||
| 226 | 0 | 0 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 2) | |||||||||||||||||||||||||||||||||||||||
| 249 | 0 | 0 | unless $discs{$a}[0] cmp $discs{$b}[0] | |||||||||||||||||||||||||||||||||||||||
| 252 | 0 | 0 | unless (defined $keys[0]) | |||||||||||||||||||||||||||||||||||||||
| 259 | 0 | 0 | if (defined $discs{$keys[$i]}[2]) | |||||||||||||||||||||||||||||||||||||||
| 268 | 0 | 0 | unless ($1 < $3) | |||||||||||||||||||||||||||||||||||||||
| 279 | 0 | 0 | unless ($1 < $3) | |||||||||||||||||||||||||||||||||||||||
| 289 | 0 | 0 | unless ($1 < $2) | |||||||||||||||||||||||||||||||||||||||
| 300 | 0 | 0 | unless ($1 < $2) | |||||||||||||||||||||||||||||||||||||||
| 311 | 0 | 0 | if ($cd =~ /^\d+$/ and defined $keys[$cd]) { } | |||||||||||||||||||||||||||||||||||||||
| 0 | 0 | elsif ($cd =~ /^(\d+)A(\d+)$/ and $discs{$keys[$1]}[$2 + 2]) { } | ||||||||||||||||||||||||||||||||||||||||
| 330 | 0 | 0 | unless (defined $disc{'url'}) | |||||||||||||||||||||||||||||||||||||||
| 331 | 0 | 0 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 1) | |||||||||||||||||||||||||||||||||||||||
| 351 | 0 | 0 | unless (defined $disc{'url'}) | |||||||||||||||||||||||||||||||||||||||
| 352 | 0 | 0 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 1) | |||||||||||||||||||||||||||||||||||||||
| 362 | 0 | 0 | if (defined $disc{'rest'}) | |||||||||||||||||||||||||||||||||||||||
| 380 | 0 | 0 | unless (defined $disc{'url'}) | |||||||||||||||||||||||||||||||||||||||
| 381 | 0 | 0 | if (defined $$self{'ARG'}{'DEBUG'} and $$self{'ARG'}{'DEBUG'} >= 1) | |||||||||||||||||||||||||||||||||||||||
| 387 | 0 | 0 | if (defined $disc{'medium'}) | |||||||||||||||||||||||||||||||||||||||
| 388 | 0 | 0 | if (defined $disc{'id'}) | |||||||||||||||||||||||||||||||||||||||
| 389 | 0 | 0 | if (defined $disc{'artist'}) | |||||||||||||||||||||||||||||||||||||||
| 391 | 0 | 0 | if (defined $disc{'year'}) | |||||||||||||||||||||||||||||||||||||||
| 392 | 0 | 0 | if (defined $disc{'source'}) | |||||||||||||||||||||||||||||||||||||||
| 393 | 0 | 0 | if (defined $disc{'quality'}) | |||||||||||||||||||||||||||||||||||||||
| 394 | 0 | 0 | if (defined $disc{'comment'}) | |||||||||||||||||||||||||||||||||||||||
| 399 | 0 | 0 | if (defined $disc{'type'} and $disc{'type'} eq 'sampler' and defined $name1) { } | |||||||||||||||||||||||||||||||||||||||
| 0 | 0 | elsif (defined $disc{'type'} and $disc{'type'} eq 'sampler' and defined $name2) { } | ||||||||||||||||||||||||||||||||||||||||
| 0 | 0 | elsif (defined $disc{'type'} and $disc{'type'} eq 'sampler') { } | ||||||||||||||||||||||||||||||||||||||||
| 401 | 0 | 0 | if (defined $artist1) | |||||||||||||||||||||||||||||||||||||||
| 402 | 0 | 0 | if (defined $name1) | |||||||||||||||||||||||||||||||||||||||
| 403 | 0 | 0 | if (defined $disc{'trackinfo'}[$i][1]) | |||||||||||||||||||||||||||||||||||||||
| 404 | 0 | 0 | if (defined $disc{'trackinfo'}[$i][2]) | |||||||||||||||||||||||||||||||||||||||
| 409 | 0 | 0 | if (defined $artist2) | |||||||||||||||||||||||||||||||||||||||
| 410 | 0 | 0 | if (defined $name2) | |||||||||||||||||||||||||||||||||||||||
| 411 | 0 | 0 | if (defined $disc{'trackinfo'}[$i][1]) | |||||||||||||||||||||||||||||||||||||||
| 412 | 0 | 0 | if (defined $disc{'trackinfo'}[$i][2]) | |||||||||||||||||||||||||||||||||||||||
| 417 | 0 | 0 | if (defined $disc{'trackinfo'}[$i][0]) | |||||||||||||||||||||||||||||||||||||||
| 418 | 0 | 0 | if (defined $disc{'trackinfo'}[$i][1]) | |||||||||||||||||||||||||||||||||||||||
| 419 | 0 | 0 | if (defined $disc{'trackinfo'}[$i][2]) | |||||||||||||||||||||||||||||||||||||||
| 424 | 0 | 0 | if (defined $disc{'trackinfo'}[$i][0]) | |||||||||||||||||||||||||||||||||||||||
| 425 | 0 | 0 | if (defined $disc{'trackinfo'}[$i][1]) | |||||||||||||||||||||||||||||||||||||||
| 426 | 0 | 0 | if (defined $disc{'trackinfo'}[$i][2]) |