Any/Impl/LwpUserAgent.pm

filter: Statementstmt 69.2% 18 / 26 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 6 / 9 Podpod 0.0% 0 / 3 totaltotal 60.0% 24 / 40 CC 2 SCAR 7.9
CC
2
Cov
64%
call
6.0
call_cb
2.0
call_p
2.0
CRAP 2.2
« Any/Fake/Request.pm ↑ Summary Any/Response/Impl/HttpPromiseResponse.pm »
1 package UserAgent::Any::Impl::LwpUserAgent;
2  
3 2 ▶use 5.036;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use UserAgent::Any::Impl::Helper 'get_call_args', 'generate_methods', 'new_response';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 with 'UserAgent::Any::Impl';
12  
13 2 our $VERSION = 0.01;
14  
15 0 ▶sub call {
Subroutine call: not called CC=2 SCAR=17.9
Pod undocumented
16 0 my ($self, $method, $url, $params, $content) = &get_call_args;
17 my $r =
18 0 ▶ $self->{ua}->$method($url, @{$params}, (defined ${$content} ? (Content => ${$content}) : ()));
Branch: 1 branch
BranchTrueFalseTotal
defined ${$content;} ? : 0 0 0
19 0 return new_response($r);
20 }
21  
22 0 ▶sub call_cb ($self, $url, %params) {
Subroutine call_cb: not called CC=1 SCAR=6.9
Pod undocumented
23 0 croak 'UserAgent::Any async methods are not implemented with LWP::UserAgent';
24 }
25  
26 0 ▶sub call_p ($self, $url, %params) {
Subroutine call_p: not called CC=1 SCAR=6.9
Pod undocumented
27 0 croak 'UserAgent::Any async methods are not implemented with LWP::UserAgent';
28 }
29  
30 2 ▶BEGIN { generate_methods() }
Subroutine BEGIN: called CC=1 SCAR=0.0
31  
32 2 1;
33  
34 __END__
« Any/Fake/Request.pm ↑ Summary Any/Response/Impl/HttpPromiseResponse.pm »