blib/lib/WebService/Annict.pm

filter: Statementstmt 82.6% 19 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 1 totaltotal 80.6% 25 / 31 CC 1 SCAR 1.3
CC
1
Cov
83%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« blib/lib/WebService/Annict/Works.pm ↑ Summary Build »
1 package WebService::Annict;
2 1 ▶use 5.008001;
Subroutine BEGIN: called CC=1 SCAR=0.0
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 ▶use LWP::UserAgent;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use HTTP::Headers;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use WebService::Annict::Works;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 our $VERSION = "0.01";
11  
12 sub new {
13 0 ▶ my ($class, %args) = @_;
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
14 0 my $access_token = %args{access_token};
15 0 my $ua = LWP::UserAgent->new(
16 agent => "Perl5 WebService::Annict/$VERSION",
17 default_headers => HTTP::Headers->new(
18 "Content-Type" => "application/json",
19 Accept => "application/json",
20 Authorization => "Bearer $access_token",
21 ),
22 );
23  
24 0 bless {
25 works => WebService::Annict::Works->new($ua),
26 }, $class;
27 }
28  
29  
30  
31 1 1;
32 __END__
« blib/lib/WebService/Annict/Works.pm ↑ Summary Build »