lib/Net/Async/Spotify/API/Search.pm

filter: Statementstmt 75.0% 27 / 36 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 8 / 10 Podpod 0.0% 0 / 2 totaltotal 67.3% 35 / 52 CC 3 SCAR 9.8
CC
3
Cov
68%
parser
6.0
parse_response
6.0
BEGIN
1.0
CRAP 2.7
« lib/Net/Async/Spotify/Scope.pm ↑ Summary lib/Net/Async/Spotify/Object/General.pm »
1 package Net::Async::Spotify::API::Search;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $VERSION = '0.002'; # VERSION
7 1 our $AUTHORITY = 'cpan:VNEALV'; # AUTHORITY
8  
9 1 ▶use mro;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use parent qw(Net::Async::Spotify::API::Generated::Search);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 ▶use Log::Any qw($log);
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use Syntax::Keyword::Try;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use JSON::MaybeUTF8 qw(:v1);
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶use Net::Async::Spotify::Object;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 =encoding utf8
18  
19 =head1 NAME
20  
21 Net::Async::Spotify::API::Search - Package representing Main Spotify Search API
22  
23 =head1 DESCRIPTION
24  
25 Main module for an Autogenerated one L<Net::Async::Spotify::API::Generated::Search>.
26 Will hold all extra functionality for Spotify Search API
27  
28 =head1 METHODS
29  
30 =cut
31  
32 0 ▶sub parser {
Subroutine parser: not called CC=2 SCAR=17.9
Pod undocumented
33 0 my ( $self, $decoded_res, $expected ) = @_;
34  
35 0 my $mapped_res;
36 0 ▶ $mapped_res = $decoded_res ? Net::Async::Spotify::Object->new($decoded_res, $expected) : $decoded_res;
Branch: 1 branch
BranchTrueFalseTotal
$decoded_res ? : 0 0 0
37  
38 0 return $mapped_res;
39 }
40  
41 0 ▶sub parse_response {
Subroutine parse_response: not called CC=2 SCAR=17.9
Pod undocumented
42 0 my ( $self, $decoded_res, $expected ) = @_;
43  
44 try {
45 0 ▶ return $decoded_res ? Net::Async::Spotify::Object->new($decoded_res, $expected) : $decoded_res;
Branch: 1 branch
BranchTrueFalseTotal
$decoded_res ? : 0 0 0
46 0 } catch ($e) {
47 0 $log->warnf('Could not Map Spotify API Response to its Object %s | Error: %s | data: %s', $expected, $e, $decoded_res);
48 0 return $decoded_res;
49 }
50 }
51 1 1;
« lib/Net/Async/Spotify/Scope.pm ↑ Summary lib/Net/Async/Spotify/Object/General.pm »