| 1 | package Net::Amazon::S3::ACL::Canned; | ||||||||||||||||||||||||||||
| 2 | # ABSTRACT: Representation of canned ACL | ||||||||||||||||||||||||||||
| 3 | 100 | $Net::Amazon::S3::ACL::Canned::VERSION = '0.992'; | |||||||||||||||||||||||||||
| 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 | 79 | ▶ | around BUILDARGS => sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=14.2
| |||||||||||||||||||||||||||||
| 20 | 79 | my ($orig, $class) = (shift, shift); | |||||||||||||||||||||||||||
| 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 | 110 | ▶ | sub build_headers { | ||||||||||||||||||||||||||
|
Subroutine
build_headers: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 35 | 110 | my ($self) = @_; | |||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||