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

filter: Statementstmt 100% 14 / 14 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 94.7% 18 / 19 CC 2 SCAR 4.1
CC
2
Cov
94%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« Net/Amazon/S3/ACL/Canned.pm ↑ Summary Net/Amazon/S3/Client.pm »
1 package Net::Amazon::S3::Error::Handler::X;
2 1 $Net::Amazon::S3::Error::Handler::X::VERSION = '0.992';
3 # ABSTRACT: Throw error specific exception
4  
5 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 extends 'Net::Amazon::S3::Error::Handler';
8  
9 1 ▶use Net::Amazon::S3::X;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 8 ▶override handle_error => sub {
Subroutine __ANON__: called CC=2 SCAR=7.0
12 8 my ($self, $response, $request) = @_;
13  
14 8 ▶ return 1 unless $response->is_error;
Branch: 1 branch
BranchTrueFalseTotal
unless $response->is_error 0 8 8
15  
16 8 my $exception = Net::Amazon::S3::X->build (
17 $response->error_code,
18 request => $request,
19 response => $response,
20 );
21  
22 8 die $exception;
23 1 };
24  
25 1 1;
26  
27 __END__
« Net/Amazon/S3/ACL/Canned.pm ↑ Summary Net/Amazon/S3/Client.pm »