Net/Amazon/S3/Operation/Object/Upload/Part/Request.pm

filter: Statementstmt 100% 22 / 22 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 96.6% 29 / 30 SCAR 6.9
CC
2
Cov
96%
http_request
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« Net/Amazon/S3/Operation/Object/Upload/Complete/Request.pm ↑ Summary Net/Amazon/S3/Error/Handler/Status.pm »
1 package Net::Amazon::S3::Operation::Object::Upload::Part::Request;
2 # ABSTRACT: An internal class to put part of a multipart upload
3 99 $Net::Amazon::S3::Operation::Object::Upload::Part::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 99 extends 'Net::Amazon::S3::Request::Object';
7  
8 99 with 'Net::Amazon::S3::Request::Role::Query::Param::Upload_id';
9 99 with 'Net::Amazon::S3::Request::Role::Query::Param::Part_number';
10 99 with 'Net::Amazon::S3::Request::Role::HTTP::Header::Copy_source';
11 99 with 'Net::Amazon::S3::Request::Role::HTTP::Method::PUT';
12  
13 99 has 'value' => ( is => 'ro', isa => 'Str|CodeRef|ScalarRef', required => 0 );
14 has 'headers' =>
15 1 ▶ ( 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 3 ▶ my ($self) = @_;
Subroutine _request_headers: called CC=1 SCAR=0.0
21  
22 3 return %{ $self->headers };
23 }
24  
25 sub http_request {
26 3 ▶ my $self = shift;
Subroutine http_request: called CC=2 SCAR=7.2
Pod documented
27  
28 3 ▶ return $self->_build_http_request(
Branch: 1 branch
BranchTrueFalseTotal
defined $self->value ? : 3 0 3
29 content => scalar( defined( $self->value ) ? $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::Upload::Part::Request - An internal class to put part of a multipart upload
44  
45 =head1 VERSION
46  
47 version 0.991
48  
49 =head1 SYNOPSIS
50  
51 my $request = Net::Amazon::S3::Operation::Object::Upload::Part::Request->new (
52 s3 => $s3,
53 bucket => $bucket,
54 key => $key,
55 value => $value,
56 acl_short => $acl_short,
57 headers => $conf,
58 part_number => $part_number,
59 upload_id => $upload_id
60 );
61  
62 =head1 DESCRIPTION
63  
64 This module puts an object.
65  
66 Implements an operation L<< UploadPart|https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html >>
67  
68 =for test_synopsis no strict 'vars'
69  
70 =head1 METHODS
71  
72 =head2 http_request
73  
74 This method returns a HTTP::Request object.
75  
76 =head1 AUTHOR
77  
78 Branislav Zahradník <barney@cpan.org>
79  
80 =head1 COPYRIGHT AND LICENSE
81  
82 This software is copyright (c) 2022 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník.
83  
84 This is free software; you can redistribute it and/or modify it under
85 the same terms as the Perl 5 programming language system itself.
86  
87 =cut
« Net/Amazon/S3/Operation/Object/Upload/Complete/Request.pm ↑ Summary Net/Amazon/S3/Error/Handler/Status.pm »