File Coverage

blib/lib/Net/Amazon/S3/Request/Role/HTTP/Header/Content_md5.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             # ABSTRACT: Content-MD5 header role
2             $Net::Amazon::S3::Request::Role::HTTP::Header::Content_md5::VERSION = '0.991';
3             use Moose::Role;
4 99     99   54656 use Digest::MD5 qw[];
  99         266  
  99         860  
5 99     99   433974 use MIME::Base64 qw[];
  99         264  
  99         1859  
6 99     99   540  
  99         233  
  99         10535  
7             around _request_headers => sub {
8             my ($inner, $self) = @_;
9             my $content = $self->_http_request_content;
10              
11             my $value = MIME::Base64::encode_base64( Digest::MD5::md5( $content ) );
12             chomp $value;
13              
14             return ($self->$inner, ('Content-MD5' => $value));
15             };
16              
17             1;
18              
19              
20             =pod
21              
22             =encoding UTF-8
23              
24             =head1 NAME
25              
26             Net::Amazon::S3::Request::Role::HTTP::Header::Content_md5 - Content-MD5 header role
27              
28             =head1 VERSION
29              
30             version 0.991
31              
32             =head1 AUTHOR
33              
34             Branislav Zahradník <barney@cpan.org>
35              
36             =head1 COPYRIGHT AND LICENSE
37              
38             This software is copyright (c) 2022 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník.
39              
40             This is free software; you can redistribute it and/or modify it under
41             the same terms as the Perl 5 programming language system itself.
42              
43             =cut