| 1 | package Net::Amazon::S3::Operation::Bucket::Create::Request; | ||||||||||||||||||||||||||||
| 2 | # ABSTRACT: An internal class to create a bucket | ||||||||||||||||||||||||||||
| 3 | 99 | $Net::Amazon::S3::Operation::Bucket::Create::Request::VERSION = '0.992'; | |||||||||||||||||||||||||||
| 4 | 99 | ▶ | use Moose 0.85; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 99 | extends 'Net::Amazon::S3::Request::Bucket'; | |||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 99 | with 'Net::Amazon::S3::Request::Role::HTTP::Header::ACL'; | |||||||||||||||||||||||||||
| 8 | 99 | with 'Net::Amazon::S3::Request::Role::HTTP::Method::PUT'; | |||||||||||||||||||||||||||
| 9 | 99 | with 'Net::Amazon::S3::Request::Role::XML::Content'; | |||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 99 | has location_constraint => ( | |||||||||||||||||||||||||||
| 12 | is => 'ro', | ||||||||||||||||||||||||||||
| 13 | isa => 'MaybeLocationConstraint', | ||||||||||||||||||||||||||||
| 14 | coerce => 1, | ||||||||||||||||||||||||||||
| 15 | required => 0, | ||||||||||||||||||||||||||||
| 16 | ); | ||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | 99 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 39 | ▶ | sub _request_content { | ||||||||||||||||||||||||||
|
Subroutine
_request_content: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||
| 21 | 39 | my ($self) = @_; | |||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 39 | my $content = ''; | |||||||||||||||||||||||||||
| 24 | 39 | ▶ | if (defined $self->location_constraint && $self->location_constraint ne 'us-east-1') { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $self->location_constraint and $self->location_constraint ne "us-east-1"
MC/DC100%2/2
defined $self->location_constraint and $self->location_constraint ne "us-east-1"
defined $self->location_constraint
$self->location_constraint ne "us-east-1"
Truth table100%3/3
A and B
A= defined $self->location_constraintB= $self->location_constraint ne "us-east-1"
| |||||||||||||||||||||||||||||
| 25 | 7 | $content = $self->_build_xml ( | |||||||||||||||||||||||||||
| 26 | CreateBucketConfiguration => [ | ||||||||||||||||||||||||||||
| 27 | { LocationConstraint => $self->location_constraint }, | ||||||||||||||||||||||||||||
| 28 | ] | ||||||||||||||||||||||||||||
| 29 | ); | ||||||||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 39 | return $content; | |||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 69 | ▶ | sub http_request { | ||||||||||||||||||||||||||
|
Subroutine
http_request: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 36 | 69 | my $self = shift; | |||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | 69 | return $self->_build_http_request ( | |||||||||||||||||||||||||||
| 39 | region => 'us-east-1', | ||||||||||||||||||||||||||||
| 40 | ); | ||||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | 99 | 1; | |||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | __END__ | ||||||||||||||||||||||||||||