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

filter: Statementstmt 100% 19 / 19 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 96.1% 25 / 26 SCAR 6.9
CC
2
Cov
95%
query_string_authentication_uri
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« Net/Amazon/S3/Error/Handler/X.pm ↑ Summary Net/Amazon/S3/Operation/Objects/Delete/Request.pm »
1 package Net::Amazon::S3::Operation::Object::Fetch::Request;
2 # ABSTRACT: An internal class to get an object
3 99 $Net::Amazon::S3::Operation::Object::Fetch::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::Method';
10  
11 99 has 'range'
12 => is => 'ro'
13 => isa => 'Str'
14 ;
15  
16 override _request_headers => sub {
17 35 ▶ my ($self) = @_;
Subroutine __ANON__: called CC=1 SCAR=0.0
18  
19 return (
20 35 super,
21 (Range => $self->range) x defined $self->range,
22 );
23 99 };
24  
25 99 __PACKAGE__->meta->make_immutable;
26  
27 sub query_string_authentication_uri {
28 8 ▶ my ( $self, $expires, $query_form ) = @_;
Subroutine query_string_authentication_uri: called CC=2 SCAR=7.0
Pod documented
29  
30 8 my $uri = URI->new( $self->_request_path );
31 8 ▶ $uri->query_form( %$query_form ) if $query_form;
Branch: 1 branch
BranchTrueFalseTotal
if $query_form 0 8 8
32  
33 8 return $self->_build_signed_request(
34 path => $uri->as_string,
35 )->query_string_authentication_uri($expires);
36 }
37  
38 99 1;
39  
40 __END__
41  
42 =pod
43  
44 =encoding UTF-8
45  
46 =head1 NAME
47  
48 Net::Amazon::S3::Operation::Object::Fetch::Request - An internal class to get an object
49  
50 =head1 VERSION
51  
52 version 0.991
53  
54 =head1 SYNOPSIS
55  
56 my $http_request = Net::Amazon::S3::Operation::Object::Fetch::Request->new (
57 s3 => $s3,
58 bucket => $bucket,
59 key => $key,
60 method => 'GET',
61 );
62  
63 =head1 DESCRIPTION
64  
65 Implements operation L<< GetObject|https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html >>.
66  
67 This module gets an object.
68  
69 =for test_synopsis no strict 'vars'
70  
71 =head1 METHODS
72  
73 =head2 http_request
74  
75 This method returns a HTTP::Request object.
76  
77 =head2 query_string_authentication_uri
78  
79 This method returns query string authentication URI.
80  
81 =head1 AUTHOR
82  
83 Branislav Zahradník <barney@cpan.org>
84  
85 =head1 COPYRIGHT AND LICENSE
86  
87 This software is copyright (c) 2022 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník.
88  
89 This is free software; you can redistribute it and/or modify it under
90 the same terms as the Perl 5 programming language system itself.
91  
92 =cut
« Net/Amazon/S3/Error/Handler/X.pm ↑ Summary Net/Amazon/S3/Operation/Objects/Delete/Request.pm »