line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Amazon::S3::Operation::Object::Add::Request; |
2
|
|
|
|
|
|
|
# ABSTRACT: An internal class to add an object to a bucket. |
3
|
|
|
|
|
|
|
$Net::Amazon::S3::Operation::Object::Add::Request::VERSION = '0.99'; |
4
|
99
|
|
|
99
|
|
769
|
use Moose 0.85; |
|
99
|
|
|
|
|
2542
|
|
|
99
|
|
|
|
|
749
|
|
5
|
99
|
|
|
99
|
|
669599
|
use MooseX::StrictConstructor 0.16; |
|
99
|
|
|
|
|
2287
|
|
|
99
|
|
|
|
|
757
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
extends 'Net::Amazon::S3::Request::Object'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
with 'Net::Amazon::S3::Request::Role::HTTP::Header::ACL'; |
10
|
|
|
|
|
|
|
with 'Net::Amazon::S3::Request::Role::HTTP::Header::Encryption'; |
11
|
|
|
|
|
|
|
with 'Net::Amazon::S3::Request::Role::HTTP::Method::PUT'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
has 'value' => ( is => 'ro', isa => 'Str|CodeRef|ScalarRef', required => 1 ); |
14
|
|
|
|
|
|
|
has 'headers' => |
15
|
|
|
|
|
|
|
( is => 'ro', isa => 'HashRef', required => 0, default => sub { {} } ); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _request_headers { |
20
|
|
|
|
|
|
|
my ($self) = @_; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
return %{ $self->headers }; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub http_request { |
26
|
38
|
|
|
38
|
1
|
85
|
my $self = shift; |
27
|
|
|
|
|
|
|
|
28
|
38
|
|
|
|
|
1468
|
return $self->_build_http_request( |
29
|
|
|
|
|
|
|
content => $self->value, |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
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.99 |
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) 2021 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 |