File Coverage

blib/lib/Net/Amazon/S3/Role/ACL.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 24 24 100.0


line stmt bran cond sub pod time code
1             # ABSTRACT: ACL specification
2             $Net::Amazon::S3::Role::ACL::VERSION = '0.991';
3             use Moose::Role;
4 99     99   53075 use Moose::Util::TypeConstraints;
  99         229  
  99         813  
5 99     99   439315  
  99         223  
  99         683  
6             use Carp ();
7 99     99   176913  
  99         206  
  99         2103  
8             use Net::Amazon::S3::ACL::Set;
9 99     99   39876 use Net::Amazon::S3::ACL::Canned;
  99         315  
  99         3170  
10 99     99   32308 use Net::Amazon::S3::Constraint::ACL::Canned;
  99         271  
  99         2794  
11 99     99   640  
  99         198  
  99         14541  
12             has acl => (
13             is => 'ro',
14             isa => union ([
15             'Net::Amazon::S3::ACL::Set',
16             'Net::Amazon::S3::ACL::Canned',
17             ]),
18             required => 0,
19             coerce => 1,
20             );
21              
22             around BUILDARGS => sub {
23             my ($orig, $class) = (shift, shift);
24             my $args = $class->$orig (@_);
25              
26             if (exists $args->{acl_short}) {
27             my $acl_short = delete $args->{acl_short};
28              
29             Carp::carp "'acl_short' parameter is ignored when 'acl' specified"
30             if exists $args->{acl};
31              
32             $args->{acl} = $acl_short
33             unless exists $args->{acl};
34             }
35              
36             delete $args->{acl} unless defined $args->{acl};
37              
38             return $args;
39             };
40              
41             1;
42              
43              
44             =pod
45              
46             =encoding UTF-8
47              
48             =head1 NAME
49              
50             Net::Amazon::S3::Role::ACL - ACL specification
51              
52             =head1 VERSION
53              
54             version 0.991
55              
56             =head1 AUTHOR
57              
58             Branislav ZahradnĂ­k <barney@cpan.org>
59              
60             =head1 COPYRIGHT AND LICENSE
61              
62             This software is copyright (c) 2022 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav ZahradnĂ­k.
63              
64             This is free software; you can redistribute it and/or modify it under
65             the same terms as the Perl 5 programming language system itself.
66              
67             =cut