| 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
| |||||||||||
| 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__ | ||||||||||