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