| 1 | package Net::Amazon::S3::Error::Handler::Status; | ||||||||||
| 2 | 99 | $Net::Amazon::S3::Error::Handler::Status::VERSION = '0.992'; | |||||||||
| 3 | # ABSTRACT: An internal class to report response errors via err properties | ||||||||||
| 4 | |||||||||||
| 5 | 99 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 99 | extends 'Net::Amazon::S3::Error::Handler'; | |||||||||
| 8 | |||||||||||
| 9 | 82 | ▶ | sub handle_error { | ||||||||
|
Subroutine
handle_error: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 10 | 82 | my ($self, $response) = @_; | |||||||||
| 11 | |||||||||||
| 12 | 82 | $self->s3->err (undef); | |||||||||
| 13 | 82 | $self->s3->errstr (undef); | |||||||||
| 14 | |||||||||||
| 15 | 82 | ▶ | return 1 unless $response->is_error; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | |||||||||||
| 17 | 42 | $self->s3->err ($response->error_code); | |||||||||
| 18 | 42 | $self->s3->errstr ($response->error_message); | |||||||||
| 19 | |||||||||||
| 20 | 42 | return 0; | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 99 | 1; | |||||||||
| 24 | |||||||||||
| 25 | __END__ | ||||||||||