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 CC 2 SCAR 5.1
CC
2
Cov
100%
handle_error
2.0
BEGIN
1.0
CRAP 1.7
« Shared/Examples/Net/Amazon/S3/API.pm ↑ Summary Net/Amazon/S3/ACL/Canned.pm »
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
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__
« Shared/Examples/Net/Amazon/S3/API.pm ↑ Summary Net/Amazon/S3/ACL/Canned.pm »