| 1 | package Paws::Net::NoResponseMockCaller; | ||
| 2 | 6 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | 6 | with 'Paws::Net::RetryCallerRole', 'Paws::Net::CallerRole'; | |
| 5 | |||
| 6 | 6 | ▶ | use Paws::Net::APIResponse; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 6 | ▶ | use File::Slurper qw(read_text write_text); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 6 | ▶ | use JSON::MaybeXS; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 6 | ▶ | use Moose::Util::TypeConstraints; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 6 | ▶ | use Path::Tiny; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 6 | has file => (is => 'rw', isa => 'Str', trigger => \&_set_file); | |
| 13 | |||
| 14 | has real_caller => ( | ||
| 15 | is => 'ro', | ||
| 16 | does => 'Paws::Net::CallerRole', | ||
| 17 | 0 | ▶ | default => sub { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 18 | 0 | require Paws::Net::Caller; | |
| 19 | 0 | Paws::Net::Caller->new; | |
| 20 | } | ||
| 21 | 6 | ); | |
| 22 | |||
| 23 | has actual_request => ( | ||
| 24 | is => 'rw', | ||
| 25 | isa => 'Object', | ||
| 26 | lazy => 1, | ||
| 27 | 0 | ▶ | default => sub { '' }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 28 | 6 | ); | |
| 29 | |||
| 30 | 0 | ▶ | has _encoder => (is => 'ro', default => sub { JSON::MaybeXS->new(canonical => 1) }); |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 31 | |||
| 32 | 0 | ▶ | sub send_request { |
|
Subroutine
send_request: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 33 | 0 | my ($self, $service, $call_object) = @_; | |
| 34 | |||
| 35 | 0 | $self->actual_request($service->prepare_request_for_call($call_object)); | |
| 36 | 0 | my $actual_call = $self->_encoder->encode($service->to_hash($call_object)); | |
| 37 | |||
| 38 | # we don't care about the response | ||
| 39 | 0 | return {}; | |
| 40 | }; | ||
| 41 | |||
| 42 | 0 | ▶ | sub caller_to_response { |
|
Subroutine
caller_to_response: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 43 | 0 | my ($self, $service, $call_object, $response) = @_; | |
| 44 | |||
| 45 | 0 | return $response; | |
| 46 | }; | ||
| 47 | |||
| 48 | 6 | 1; | |