File Coverage

blib/lib/Net/Amazon/S3/Error/Handler/Status.pm
Criterion Covered Total %
statement 10 10 100.0
branch 2 2 100.0
condition n/a
subroutine 2 2 100.0
pod 1 1 100.0
total 15 15 100.0


line stmt bran cond sub pod time code
1             $Net::Amazon::S3::Error::Handler::Status::VERSION = '0.991';
2             # ABSTRACT: An internal class to report response errors via err properties
3              
4             use Moose;
5 99     99   47793  
  99         243  
  99         2890  
6             extends 'Net::Amazon::S3::Error::Handler';
7              
8             my ($self, $response) = @_;
9              
10 82     82 1 764 $self->s3->err (undef);
11             $self->s3->errstr (undef);
12 82         2276  
13 82         1867 return 1 unless $response->is_error;
14              
15 82 100       373 $self->s3->err ($response->error_code);
16             $self->s3->errstr ($response->error_message);
17 42         1329  
18 42         1102 return 0;
19             }
20 42         177  
21             1;
22              
23              
24             =pod
25              
26             =encoding UTF-8
27              
28             =head1 NAME
29              
30             Net::Amazon::S3::Error::Handler::Status - An internal class to report response errors via err properties
31              
32             =head1 VERSION
33              
34             version 0.991
35              
36             =head1 DESCRIPTION
37              
38             Propagate error code and error message via connection's C<err> / C<errstr>
39             methods.
40              
41             =head1 AUTHOR
42              
43             Branislav Zahradník <barney@cpan.org>
44              
45             =head1 COPYRIGHT AND LICENSE
46              
47             This software is copyright (c) 2022 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník.
48              
49             This is free software; you can redistribute it and/or modify it under
50             the same terms as the Perl 5 programming language system itself.
51              
52             =cut