Spotify/Lookup.pm

filter: Statementstmt 100% 19 / 19 Branchbran 100% 2 / 2 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 93.5% 29 / 31 CC 4 SCAR 10.0
CC
4
Cov
96%
format_request
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
↑ Summary Spotify/Search.pm »
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
BranchTrueFalseTotal
if (exists $parameters{$key} and $parameters{$key}) 5 1 6
Condition66%2/3
exists $parameters{$key} and $parameters{$key}
!ll&&!rl&&r
105
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}
ABresult
0X0
100
111
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__
↑ Summary Spotify/Search.pm »