File Coverage

blib/lib/Net/Amazon/S3/Request/Role/HTTP/Header/Copy_source.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Net::Amazon::S3::Request::Role::HTTP::Header::Copy_source;
2             # ABSTRACT: x-amz-copy-source header role
3             $Net::Amazon::S3::Request::Role::HTTP::Header::Copy_source::VERSION = '0.99';
4 99     99   73778 use Moose::Role;
  99         335  
  99         890  
5              
6 99     99   536364 use Net::Amazon::S3::Constants;
  99         337  
  99         18842  
7              
8             with 'Net::Amazon::S3::Request::Role::HTTP::Header' => {
9             name => '_copy_source',
10             header => Net::Amazon::S3::Constants->HEADER_COPY_SOURCE,
11             isa => 'Maybe[Str]',
12             required => 0,
13             default => sub {
14             my ($self) = @_;
15             defined $self->copy_source_bucket && defined $self->copy_source_key
16             ? $self->copy_source_bucket.'/'.$self->copy_source_key
17             : undef
18             ;
19             },
20             };
21              
22             has 'copy_source_bucket' => ( is => 'ro', isa => 'Str', required => 0 );
23             has 'copy_source_key' => ( is => 'ro', isa => 'Str', required => 0 );
24              
25             1;
26              
27             __END__
28              
29             =pod
30              
31             =encoding UTF-8
32              
33             =head1 NAME
34              
35             Net::Amazon::S3::Request::Role::HTTP::Header::Copy_source - x-amz-copy-source header role
36              
37             =head1 VERSION
38              
39             version 0.99
40              
41             =head1 AUTHOR
42              
43             Branislav Zahradník <barney@cpan.org>
44              
45             =head1 COPYRIGHT AND LICENSE
46              
47             This software is copyright (c) 2021 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník.
48              
49             This is free software; you can redistribute it and/or modify it under
50             the same terms as the Perl 5 programming language system itself.
51              
52             =cut