Branch Coverage

blib/lib/WebService/Soundcloud.pm
Criterion Covered Total %
branch 28 94 29.7


line true false branch
146 0 0 unless (defined $client_id or defined $client_secret)
151 0 1 unless defined $options
158 1 0 unless $$options{'debug'}
175 1 1 if (defined $client_id)
194 1 1 if (defined $client_secret)
221 0 2 if (defined $redirect_uri)
246 1 0 if (defined $self->redirect_uri)
266 1 2 unless (defined $$self{'user_agent'})
290 1 0 if ref $args eq 'HASH'
316 0 0 if ref $args eq 'HASH'
330 0 0 if ($$self{'scope'})
334 0 0 if ($$self{'username'} and $$self{'password'}) { }
0 0 elsif (defined $code) { }
376 0 0 if ref $args eq 'HASH'
397 0 3 if (defined $content)
428 0 0 if ($res->is_success)
459 1 0 unless (defined $params)
470 0 1 if ($res->is_success) { }
472 0 0 if (defined(my $obj = $self->parse_content($res->decoded_content))) { }
474 0 0 if (defined(my $type = reftype $obj))
476 0 0 if ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'HASH') { }
483 0 0 if (exists $$obj{'collection'}) { }
485 0 0 unless (defined($url = $$obj{'next_href'}))
569 0 0 unless $$extra_headers{'Content-Length'}
617 0 0 unless ($rc = $response->is_success)
649 0 0 if (_is_redirect($code))
654 0 0 if (my $ref_uri = $response->header('Location'))
659 0 0 if ($ua->redirect_ok($referal, $response))
681 0 0 if (defined $code)
683 0 0 if ($code == &HTTP::Status::RC_MOVED_PERMANENTLY or $code == &HTTP::Status::RC_FOUND or $code == &HTTP::Status::RC_SEE_OTHER or $code == &HTTP::Status::RC_TEMPORARY_REDIRECT)
704 1 2 if ($format) { }
1 1 elsif (not defined $$self{'request_format'}) { }
727 2 3 if ($format) { }
1 2 elsif (not defined $$self{'response_format'}) { }
754 0 0 if (defined $content)
759 0 0 if ($self->response_format eq 'json') { }
0 0 elsif ($self->response_format eq 'xml') { }
770 0 0 if ($@)
802 0 0 unless $response->is_success
846 0 4 $$self{'development'} ? :
853 0 4 if ($uri->query)
855 0 0 unless $params
872 3 0 if $$self{'response_format'}
874 3 0 if $$self{'request_format'}
876 3 0 if $$self{'access_token'} and not $$extra{'no_auth'}
894 0 3 if ($$self{'debug'})