Net/Amazon/S3/Error/Handler/Status.pm

filter: Statementstmt 100% 13 / 13 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod 100% 1 / 1 totaltotal 100% 18 / 18 SCAR 6.9
CC
2
Cov
100%
handle_error
2.0
BEGIN
1.0
CRAP 2.0
« Net/Amazon/S3/Operation/Object/Upload/Part/Request.pm ↑ Summary Net/Amazon/S3/Request/Role/HTTP/Header/ACL.pm »
1 package Net::Amazon::S3::Error::Handler::Status;
2 99 $Net::Amazon::S3::Error::Handler::Status::VERSION = '0.991';
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 sub handle_error {
10 82 ▶ my ($self, $response) = @_;
Subroutine handle_error: called CC=2 SCAR=6.9
Pod documented
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
BranchTrueFalseTotal
unless $response->is_error 40 42 82
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__
26  
27 =pod
28  
29 =encoding UTF-8
30  
31 =head1 NAME
32  
33 Net::Amazon::S3::Error::Handler::Status - An internal class to report response errors via err properties
34  
35 =head1 VERSION
36  
37 version 0.991
38  
39 =head1 DESCRIPTION
40  
41 Propagate error code and error message via connection's C<err> / C<errstr>
42 methods.
43  
44 =head1 AUTHOR
45  
46 Branislav Zahradník <barney@cpan.org>
47  
48 =head1 COPYRIGHT AND LICENSE
49  
50 This software is copyright (c) 2022 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník.
51  
52 This is free software; you can redistribute it and/or modify it under
53 the same terms as the Perl 5 programming language system itself.
54  
55 =cut
« Net/Amazon/S3/Operation/Object/Upload/Part/Request.pm ↑ Summary Net/Amazon/S3/Request/Role/HTTP/Header/ACL.pm »