File Coverage

blib/lib/Net/Amazon/S3/Operation/Object/Fetch/Request.pm
Criterion Covered Total %
statement 10 10 100.0
branch 1 2 50.0
condition n/a
subroutine 3 3 100.0
pod 1 1 100.0
total 15 16 93.7


line stmt bran cond sub pod time code
1             package Net::Amazon::S3::Operation::Object::Fetch::Request;
2             # ABSTRACT: An internal class to get an object
3             $Net::Amazon::S3::Operation::Object::Fetch::Request::VERSION = '0.98';
4 96     96   749 use Moose 0.85;
  96         4747  
  96         797  
5 96     96   660002 use MooseX::StrictConstructor 0.16;
  96         2284  
  96         826  
6              
7             extends 'Net::Amazon::S3::Request::Object';
8              
9             with 'Net::Amazon::S3::Request::Role::HTTP::Method';
10              
11             __PACKAGE__->meta->make_immutable;
12              
13             sub query_string_authentication_uri {
14 8     8 1 62 my ( $self, $expires, $query_form ) = @_;
15              
16 8         46 my $uri = URI->new( $self->_request_path );
17 8 50       10111 $uri->query_form( %$query_form ) if $query_form;
18              
19 8         46 return $self->_build_signed_request(
20             path => $uri->as_string,
21             )->query_string_authentication_uri($expires);
22             }
23              
24             1;
25              
26             __END__
27              
28             =pod
29              
30             =encoding UTF-8
31              
32             =head1 NAME
33              
34             Net::Amazon::S3::Operation::Object::Fetch::Request - An internal class to get an object
35              
36             =head1 VERSION
37              
38             version 0.98
39              
40             =head1 SYNOPSIS
41              
42             my $http_request = Net::Amazon::S3::Operation::Object::Fetch::Request->new (
43             s3 => $s3,
44             bucket => $bucket,
45             key => $key,
46             method => 'GET',
47             );
48              
49             =head1 DESCRIPTION
50              
51             Implements operation L<< GetObject|https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html >>.
52              
53             This module gets an object.
54              
55             =for test_synopsis no strict 'vars'
56              
57             =head1 METHODS
58              
59             =head2 http_request
60              
61             This method returns a HTTP::Request object.
62              
63             =head2 query_string_authentication_uri
64              
65             This method returns query string authentication URI.
66              
67             =head1 AUTHOR
68              
69             Branislav Zahradník <barney@cpan.org>
70              
71             =head1 COPYRIGHT AND LICENSE
72              
73             This software is copyright (c) 2021 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník.
74              
75             This is free software; you can redistribute it and/or modify it under
76             the same terms as the Perl 5 programming language system itself.
77              
78             =cut