| 1 | package Net::Amazon::S3::Request::Role::Tags::Add; | ||
| 2 | # ABSTRACT: Add tags request parts common to Bucket and Object | ||
| 3 | 99 | $Net::Amazon::S3::Request::Role::Tags::Add::VERSION = '0.992'; | |
| 4 | 99 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 99 | with 'Net::Amazon::S3::Request::Role::HTTP::Method::PUT'; | |
| 7 | 99 | with 'Net::Amazon::S3::Request::Role::Query::Action::Tagging'; | |
| 8 | 99 | with 'Net::Amazon::S3::Request::Role::XML::Content'; | |
| 9 | |||
| 10 | 99 | has 'tags' => ( | |
| 11 | is => 'ro', | ||
| 12 | isa => 'HashRef', | ||
| 13 | required => 1, | ||
| 14 | ); | ||
| 15 | |||
| 16 | 19 | ▶ | sub _request_content { |
|
Subroutine
_request_content: called CC=1 SCAR=0.0
| |||
| 17 | 19 | my ($self) = @_; | |
| 18 | |||
| 19 | $self->_build_xml (Tagging => [ | ||
| 20 | { TagSet => [ | ||
| 21 | map +{ Tag => [ | ||
| 22 | { Key => $_ }, | ||
| 23 | { Value => $self->tags->{$_} }, | ||
| 24 | 19 | ]}, sort keys %{ $self->tags } | |
| 25 | ]}, | ||
| 26 | ]); | ||
| 27 | } | ||
| 28 | |||
| 29 | |||
| 30 | 99 | 1; | |
| 31 | |||
| 32 | __END__ | ||