| 1 | package Net::Amazon::S3::ACL::Canned; | ||||||||||||||||||||||||||||
| 2 | # ABSTRACT: Representation of canned ACL | ||||||||||||||||||||||||||||
| 3 | 100 | $Net::Amazon::S3::ACL::Canned::VERSION = '0.991'; | |||||||||||||||||||||||||||
| 4 | 100 | ▶ | use Moose 0.85; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 100 | ▶ | use MooseX::StrictConstructor 0.16; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 100 | ▶ | use Moose::Util::TypeConstraints; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 100 | ▶ | use Net::Amazon::S3::Constraint::ACL::Canned; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 100 | ▶ | use Net::Amazon::S3::Constants; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 100 | class_type 'Net::Amazon::S3::ACL::Canned'; | |||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | coerce 'Net::Amazon::S3::ACL::Canned' | ||||||||||||||||||||||||||||
| 15 | => from 'Net::Amazon::S3::Constraint::ACL::Canned' | ||||||||||||||||||||||||||||
| 16 | 49 | ▶ | => via { Net::Amazon::S3::ACL::Canned->new ($_) } | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 17 | 100 | ; | |||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | around BUILDARGS => sub { | ||||||||||||||||||||||||||||
| 20 | 79 | ▶ | my ($orig, $class) = (shift, shift); | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=14.2
| |||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 79 | ▶ | return +{ canned_acl => $_[0] } | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
@_ == 1 and not ref $_[0]
MC/DC0%0/2
@_ == 1 and not ref $_[0]
@_ == 1
not ref $_[0]
Truth table33%1/3
A and not(B)
A= @_ == 1B= not ref $_[0]
| |||||||||||||||||||||||||||||
| 23 | if @_ == 1 && ! ref $_[0]; | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 0 | return $class->$orig (@_); | |||||||||||||||||||||||||||
| 26 | 100 | }; | |||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 100 | has canned_acl => ( | |||||||||||||||||||||||||||
| 29 | is => 'ro', | ||||||||||||||||||||||||||||
| 30 | isa => 'Net::Amazon::S3::Constraint::ACL::Canned', | ||||||||||||||||||||||||||||
| 31 | required => 1, | ||||||||||||||||||||||||||||
| 32 | ); | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | sub build_headers { | ||||||||||||||||||||||||||||
| 35 | 110 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
build_headers: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | 110 | return +(Net::Amazon::S3::Constants->HEADER_CANNED_ACL => $self->canned_acl); | |||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | 16 | ▶ | sub PRIVATE { __PACKAGE__->new ('private') } | ||||||||||||||||||||||||||
|
Subroutine
PRIVATE: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 41 | 2 | ▶ | sub PUBLIC_READ { __PACKAGE__->new ('public-read') } | ||||||||||||||||||||||||||
|
Subroutine
PUBLIC_READ: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 42 | 2 | ▶ | sub PUBLIC_READ_WRITE { __PACKAGE__->new ('public-read-write') } | ||||||||||||||||||||||||||
|
Subroutine
PUBLIC_READ_WRITE: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 43 | 2 | ▶ | sub AWS_EXEC_READ { __PACKAGE__->new ('aws-exec-read') } | ||||||||||||||||||||||||||
|
Subroutine
AWS_EXEC_READ: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 44 | 2 | ▶ | sub AUTHENTICATED_READ { __PACKAGE__->new ('authenticated-read') } | ||||||||||||||||||||||||||
|
Subroutine
AUTHENTICATED_READ: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 45 | 2 | ▶ | sub BUCKET_OWNER_READ { __PACKAGE__->new ('bucket-owner-read') } | ||||||||||||||||||||||||||
|
Subroutine
BUCKET_OWNER_READ: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 46 | 2 | ▶ | sub BUCKET_OWNER_FULL_CONTROL { __PACKAGE__->new ('bucket-owner-full-control') } | ||||||||||||||||||||||||||
|
Subroutine
BUCKET_OWNER_FULL_CONTROL: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 47 | 2 | ▶ | sub LOG_DELIVERY_WRITE { __PACKAGE__->new ('log-delivery-write') } | ||||||||||||||||||||||||||
|
Subroutine
LOG_DELIVERY_WRITE: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | 100 | 1; | |||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||
| 51 | __END__ | ||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | =pod | ||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | =encoding UTF-8 | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | =head1 NAME | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | Net::Amazon::S3::ACL::Canned - Representation of canned ACL | ||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | =head1 VERSION | ||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | version 0.991 | ||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||
| 65 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||
| 67 | my $acl = Net::Amazon::S3::ACL::Canned->PRIVATE; | ||||||||||||||||||||||||||||
| 68 | my $acl = Net::Amazon::S3::ACL::Canned->PUBLIC_READ; | ||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||
| 70 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||
| 72 | Class representes predefined Amazon S3 canned ACL. | ||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||
| 74 | =head1 FACTORY BUILDERS | ||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||
| 76 | =head2 PRIVATE | ||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||
| 78 | =head2 PUBLIC_READ | ||||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||
| 80 | =head2 PUBLIC_READ_WRITE | ||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||
| 82 | =head2 AWS_EXEC_READ | ||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||
| 84 | =head2 AUTHENTICATED_READ | ||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||
| 86 | =head2 BUCKET_OWNER_READ | ||||||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||||
| 88 | =head2 BUCKET_OWNER_FULL_CONTROL | ||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||
| 90 | =head2 LOG_DELIVER_WRITE | ||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||
| 92 | =head1 AUTHOR | ||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||
| 94 | Branislav Zahradník <barney@cpan.org> | ||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||
| 96 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||
| 98 | This module is part of L<Net::Amazon::S3>. | ||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||
| 100 | =head1 AUTHOR | ||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||
| 102 | Branislav Zahradník <barney@cpan.org> | ||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||
| 104 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||
| 106 | This software is copyright (c) 2022 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník. | ||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||
| 108 | This is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||||||||||
| 109 | the same terms as the Perl 5 programming language system itself. | ||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||
| 111 | =cut | ||||||||||||||||||||||||||||