« Net/Amazon/S3/Operation/Object/Acl/Set/Request.pm
↑ Summary
Net/Amazon/S3/Error/Handler/Legacy.pm »
| 1 | package Net::Amazon::S3::Operation::Bucket::Acl::Set::Request; | ||||||||||||||||||||||||||||
| 2 | # ABSTRACT: An internal class to set a bucket's access control | ||||||||||||||||||||||||||||
| 3 | 99 | $Net::Amazon::S3::Operation::Bucket::Acl::Set::Request::VERSION = '0.992'; | |||||||||||||||||||||||||||
| 4 | 99 | ▶ | use Moose 0.85; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 99 | ▶ | use MooseX::StrictConstructor 0.16; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 99 | ▶ | use Carp (); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 99 | extends 'Net::Amazon::S3::Request::Bucket'; | |||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 99 | with 'Net::Amazon::S3::Request::Role::HTTP::Header::ACL'; | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 99 | has 'acl_xml' => ( | |||||||||||||||||||||||||||
| 14 | is => 'ro', | ||||||||||||||||||||||||||||
| 15 | isa => 'Maybe[Str]', | ||||||||||||||||||||||||||||
| 16 | required => 0, | ||||||||||||||||||||||||||||
| 17 | ); | ||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 99 | with 'Net::Amazon::S3::Request::Role::Query::Action::Acl'; | |||||||||||||||||||||||||||
| 20 | 99 | with 'Net::Amazon::S3::Request::Role::HTTP::Method::PUT'; | |||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 99 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 22 | ▶ | sub _request_content { | ||||||||||||||||||||||||||
|
Subroutine
_request_content: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||
| 25 | 22 | my ($self) = @_; | |||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 22 | ▶ | return $self->acl_xml || ''; | ||||||||||||||||||||||||||
|
Condition100%2/2
$self->acl_xml || ''
MC/DC100%1/1
$self->acl_xml || ''
$self->acl_xml
Truth table100%2/2
A
A= $self->acl_xml
| |||||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | 24 | ▶ | sub BUILD { | ||||||||||||||||||||||||||
|
Subroutine
BUILD: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 31 | 24 | my ($self) = @_; | |||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | 24 | ▶ | unless ($self->acl_xml || $self->acl) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->acl_xml or $self->acl
MC/DC100%2/2
$self->acl_xml or $self->acl
$self->acl_xml
$self->acl
Truth table100%3/3
A or B
A= $self->acl_xmlB= $self->acl
| |||||||||||||||||||||||||||||
| 34 | 1 | Carp::confess "need either acl_xml or acl"; | |||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | 23 | ▶ | if ($self->acl_xml && $self->acl) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->acl_xml and $self->acl
MC/DC100%2/2
$self->acl_xml and $self->acl
$self->acl_xml
$self->acl
Truth table100%3/3
A and B
A= $self->acl_xmlB= $self->acl
| |||||||||||||||||||||||||||||
| 38 | 1 | Carp::confess "can not provide both acl_xml and acl"; | |||||||||||||||||||||||||||
| 39 | } | ||||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 99 | 1; | |||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | __END__ | ||||||||||||||||||||||||||||