Net/Amazon/S3/X.pm

filter: Statementstmt 100% 18 / 18 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 96.0% 24 / 25 CC 3 SCAR 6.9
CC
3
Cov
100%
import
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« Net/Amazon/S3/ACL/Grantee/Group.pm ↑ Summary Shared/Examples/Net/Amazon/S3/API.pm »
1 package Net::Amazon::S3::X;
2 1 $Net::Amazon::S3::X::VERSION = '0.992';
3 # ABSTRACT: Net::Amazon::S3 exceptions
4  
5 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Moose::Meta::Class;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 has request => (
9 is => 'ro',
10 );
11  
12 1 has response => (
13 is => 'ro',
14 handles => [
15 'error_code',
16 'error_message',
17 'http_response',
18 ],
19 );
20  
21 1 my %exception_map;
22 12 ▶sub import {
Subroutine import: called CC=3 SCAR=11.0
23 12 my ($class, @exceptions) = @_;
24  
25 12 for my $exception (@exceptions) {
26 10 ▶ next if exists $exception_map{$exception};
Branch: 1 branch
BranchTrueFalseTotal
if exists $exception_map{$exception} 5 5 10
27 Moose::Meta::Class->create (
28 5 $exception_map{$exception} = __PACKAGE__ . "::$exception",
29 superclasses => [ __PACKAGE__ ],
30 );
31 }
32 }
33  
34 10 ▶sub build {
Subroutine build: called CC=1 SCAR=0.0
Pod undocumented
35 10 my ($self, $exception, @params) = @_;
36  
37 10 $self->import ($exception);
38  
39 10 $exception_map{$exception}->new (@params);
40 }
41  
42 1 1;
43  
44 __END__
« Net/Amazon/S3/ACL/Grantee/Group.pm ↑ Summary Shared/Examples/Net/Amazon/S3/API.pm »