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 SCAR 11.0
CC
3
Cov
100%
import
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« Net/Amazon/S3/ACL/Canned.pm ↑ Summary Net/Amazon/S3/Operation/Bucket/Create/Request.pm »
1 package Net::Amazon::S3::X;
2 1 $Net::Amazon::S3::X::VERSION = '0.991';
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 sub import {
23 12 ▶ my ($class, @exceptions) = @_;
Subroutine import: called CC=3 SCAR=11.0
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 sub build {
35 10 ▶ my ($self, $exception, @params) = @_;
Subroutine build: called CC=1 SCAR=0.0
Pod undocumented
36  
37 10 $self->import ($exception);
38  
39 10 $exception_map{$exception}->new (@params);
40 }
41  
42 1 1;
43  
44 __END__
45  
46 =pod
47  
48 =encoding UTF-8
49  
50 =head1 NAME
51  
52 Net::Amazon::S3::X - Net::Amazon::S3 exceptions
53  
54 =head1 VERSION
55  
56 version 0.991
57  
58 =head1 AUTHOR
59  
60 Branislav Zahradník <barney@cpan.org>
61  
62 =head1 COPYRIGHT AND LICENSE
63  
64 This software is copyright (c) 2022 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník.
65  
66 This is free software; you can redistribute it and/or modify it under
67 the same terms as the Perl 5 programming language system itself.
68  
69 =cut
« Net/Amazon/S3/ACL/Canned.pm ↑ Summary Net/Amazon/S3/Operation/Bucket/Create/Request.pm »