Net/Amazon/S3/Operation/Object/Add/Request.pm

filter: Statementstmt 100% 21 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 27 / 27 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
__ANON__
1.0
CRAP 1.0
« Net/Amazon/S3/Operation/Object/Add.pm ↑ Summary Net/Amazon/S3/Operation/Object/Add/Response.pm »
1 package Net::Amazon::S3::Operation::Object::Add::Request;
2 # ABSTRACT: An internal class to add an object to a bucket.
3 99 $Net::Amazon::S3::Operation::Object::Add::Request::VERSION = '0.991';
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 extends 'Net::Amazon::S3::Request::Object';
8  
9 99 with 'Net::Amazon::S3::Request::Role::HTTP::Header::ACL';
10 99 with 'Net::Amazon::S3::Request::Role::HTTP::Header::Encryption';
11 99 with 'Net::Amazon::S3::Request::Role::HTTP::Method::PUT';
12  
13 99 has 'value' => ( is => 'ro', isa => 'Str|CodeRef|ScalarRef', required => 1 );
14 has 'headers' =>
15 6 ▶ ( is => 'ro', isa => 'HashRef', required => 0, default => sub { {} } );
Subroutine __ANON__: called CC=1 SCAR=0.0
16  
17 99 __PACKAGE__->meta->make_immutable;
18  
19 sub _request_headers {
20 38 ▶ my ($self) = @_;
Subroutine _request_headers: called CC=1 SCAR=0.0
21  
22 38 return %{ $self->headers };
23 }
24  
25 sub http_request {
26 38 ▶ my $self = shift;
Subroutine http_request: called CC=1 SCAR=0.0
Pod documented
27  
28 38 return $self->_build_http_request(
29 content => $self->value,
30 );
31 }
32  
33 99 1;
34  
35 __END__
36  
37 =pod
38  
39 =encoding UTF-8
40  
41 =head1 NAME
42  
43 Net::Amazon::S3::Operation::Object::Add::Request - An internal class to add an object to a bucket.
44  
45 =head1 VERSION
46  
47 version 0.991
48  
49 =head1 SYNOPSIS
50  
51 my $http_request = Net::Amazon::S3::Operation::Object::Add::Request->new (
52 s3 => $s3,
53 bucket => $bucket,
54 key => $key,
55 value => $value,
56 acl_short => $acl_short,
57 headers => $conf,
58 );
59  
60 =head1 DESCRIPTION
61  
62 Implements operation L<< PutObject|https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html >>.
63  
64 This module puts an object.
65  
66 =for test_synopsis no strict 'vars'
67  
68 =head1 METHODS
69  
70 =head2 http_request
71  
72 This method returns a HTTP::Request object.
73  
74 =head1 AUTHOR
75  
76 Branislav Zahradník <barney@cpan.org>
77  
78 =head1 COPYRIGHT AND LICENSE
79  
80 This software is copyright (c) 2022 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník.
81  
82 This is free software; you can redistribute it and/or modify it under
83 the same terms as the Perl 5 programming language system itself.
84  
85 =cut
« Net/Amazon/S3/Operation/Object/Add.pm ↑ Summary Net/Amazon/S3/Operation/Object/Add/Response.pm »