File Coverage

blib/lib/Net/Amazon/S3/Request/Role/Tags/Add.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::Tags::Add;
2             # ABSTRACT: Add tags request parts common to Bucket and Object
3             $Net::Amazon::S3::Request::Role::Tags::Add::VERSION = '0.98';
4 96     96   70554 use Moose::Role;
  96         302  
  96         955  
5              
6             with 'Net::Amazon::S3::Request::Role::HTTP::Method::PUT';
7             with 'Net::Amazon::S3::Request::Role::Query::Action::Tagging';
8             with 'Net::Amazon::S3::Request::Role::XML::Content';
9              
10             has 'tags' => (
11             is => 'ro',
12             isa => 'HashRef',
13             required => 1,
14             );
15              
16             sub _request_content {
17 19     19   56 my ($self) = @_;
18              
19             $self->_build_xml (Tagging => [
20             { TagSet => [
21             map +{ Tag => [
22             { Key => $_ },
23             { Value => $self->tags->{$_} },
24 19         56 ]}, sort keys %{ $self->tags }
  19         800  
25             ]},
26             ]);
27             }
28              
29              
30             1;
31              
32             __END__
33              
34             =pod
35              
36             =encoding UTF-8
37              
38             =head1 NAME
39              
40             Net::Amazon::S3::Request::Role::Tags::Add - Add tags request parts common to Bucket and Object
41              
42             =head1 VERSION
43              
44             version 0.98
45              
46             =head1 AUTHOR
47              
48             Branislav Zahradník <barney@cpan.org>
49              
50             =head1 COPYRIGHT AND LICENSE
51              
52             This software is copyright (c) 2021 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník.
53              
54             This is free software; you can redistribute it and/or modify it under
55             the same terms as the Perl 5 programming language system itself.
56              
57             =cut