| 1 | package Net::Spotify::Lookup; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 4 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 4 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 4 | ▶ | use base 'Net::Spotify::Service'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 4 | our $VERSION = '0.03'; | |||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 3 | ▶ | sub format_request { | ||||||||||||||||||||||||||
|
Subroutine
format_request: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||||||||||||||||||||
| 11 | 3 | my ($self, %parameters) = @_; | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 3 | my $base_url = $self->base_url(); | |||||||||||||||||||||||||||
| 14 | 3 | my $version = $self->version(); | |||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 3 | my $uri = URI->new("$base_url/lookup/$version/"); | |||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | 3 | foreach my $key (qw(uri extras)) { | |||||||||||||||||||||||||||
| 19 | 6 | ▶ | if (exists $parameters{$key} && $parameters{$key}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
exists $parameters{$key} and $parameters{$key}
MC/DC50%1/2
exists $parameters{$key} and $parameters{$key}
exists $parameters{$key}
$parameters{$key}
Truth table66%2/3
A and B
A= exists $parameters{$key}B= $parameters{$key}
| |||||||||||||||||||||||||||||
| 20 | 5 | $uri->query_param($key, $parameters{$key}); | |||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||
| 22 | } | ||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 3 | return HTTP::Request->new('GET', $uri); | |||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 4 | 1; | |||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | __END__ | ||||||||||||||||||||||||||||