S3/Request/SetBucketPolicy.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 94.4% 17 / 18 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
request
1.0
CRAP 1.0
« S3/Request/GetPreSignedUrl.pm ↑ Summary S3/Roles/BucketAction.pm »
1  
2 package AWS::S3::Request::SetBucketPolicy;
3  
4 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use AWS::S3::ResponseParser;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 with 'AWS::S3::Roles::Request';
8  
9 3 has 'bucket' => ( is => 'ro', isa => 'AWS::S3::BucketName', required => 1 );
10  
11 3 has '_subresource' => (
12 is => 'ro',
13 isa => 'Str',
14 init_arg => undef,
15 default => 'policy'
16 );
17  
18 3 has 'policy' => (
19 is => 'ro',
20 isa => 'Maybe[Str]',
21 required => 1,
22  
23 # Evan Carroll 6/14/2012
24 # COMMENTED THIS OUT, not sure if it ever worked on VSO
25 # Must be able to decode the JSON string:
26 # where => sub {
27 # eval { decode_json( $_ ); 1 };
28 # }
29 );
30  
31 3 has '+_expect_nothing' => ( default => 1 );
32  
33 3 ▶sub request {
Subroutine request: called CC=1 SCAR=0.0
Pod undocumented
34 3 my $s = shift;
35  
36 3 $s->_send_request(
37 PUT => $s->_uri => {
38 Date => $s->_http_date,
39 },
40 $s->policy
41 );
42 } # end request()
43  
44 3 __PACKAGE__->meta->make_immutable;
« S3/Request/GetPreSignedUrl.pm ↑ Summary S3/Roles/BucketAction.pm »