« Net/Amazon/S3/Operation/Bucket/Create/Request.pm
↑ Summary
Shared/Examples/Net/Amazon/S3/Fixture.pm »
| 1 | package Net::Amazon::S3::Operation::Buckets::List::Response; | ||
| 2 | # ABSTRACT: An internal class to process list all buckets response | ||
| 3 | 99 | $Net::Amazon::S3::Operation::Buckets::List::Response::VERSION = '0.991'; | |
| 4 | 99 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 99 | extends 'Net::Amazon::S3::Response'; | |
| 7 | |||
| 8 | sub owner_id { | ||
| 9 | 4 | ▶ | $_[0]->_data->{owner_id}; |
|
Subroutine
owner_id: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 10 | } | ||
| 11 | |||
| 12 | sub owner_displayname { | ||
| 13 | 4 | ▶ | $_[0]->_data->{owner_displayname}; |
|
Subroutine
owner_displayname: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 14 | } | ||
| 15 | |||
| 16 | sub buckets { | ||
| 17 | 4 | ▶ | @{ $_[0]->_data->{buckets} }; |
|
Subroutine
buckets: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 18 | } | ||
| 19 | |||
| 20 | sub _parse_data { | ||
| 21 | 4 | ▶ | my ($self) = @_; |
|
Subroutine
_parse_data: called CC=2 SCAR=6.9
| |||
| 22 | |||
| 23 | 4 | my $xpc = $self->xpath_context; | |
| 24 | |||
| 25 | 4 | my $data = { | |
| 26 | owner_id => $xpc->findvalue ("/s3:ListAllMyBucketsResult/s3:Owner/s3:ID"), | ||
| 27 | owner_displayname => $xpc->findvalue ("/s3:ListAllMyBucketsResult/s3:Owner/s3:DisplayName"), | ||
| 28 | buckets => [], | ||
| 29 | }; | ||
| 30 | |||
| 31 | 4 | foreach my $node ($xpc->findnodes ("/s3:ListAllMyBucketsResult/s3:Buckets/s3:Bucket")) { | |
| 32 | 8 | push @{ $data->{buckets} }, { | |
| 33 | name => $xpc->findvalue ("./s3:Name", $node), | ||
| 34 | creation_date => $xpc->findvalue ("./s3:CreationDate", $node), | ||
| 35 | }; | ||
| 36 | } | ||
| 37 | |||
| 38 | 4 | return $data; | |
| 39 | } | ||
| 40 | |||
| 41 | 99 | 1; | |
| 42 | |||
| 43 | __END__ | ||
| 44 | |||
| 45 | =pod | ||
| 46 | |||
| 47 | =encoding UTF-8 | ||
| 48 | |||
| 49 | =head1 NAME | ||
| 50 | |||
| 51 | Net::Amazon::S3::Operation::Buckets::List::Response - An internal class to process list all buckets response | ||
| 52 | |||
| 53 | =head1 VERSION | ||
| 54 | |||
| 55 | version 0.991 | ||
| 56 | |||
| 57 | =head1 DESCRIPTION | ||
| 58 | |||
| 59 | Implements S3 operation L<< ListBuckets|https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html >> | ||
| 60 | |||
| 61 | =head1 AUTHOR | ||
| 62 | |||
| 63 | Branislav Zahradník <barney@cpan.org> | ||
| 64 | |||
| 65 | =head1 COPYRIGHT AND LICENSE | ||
| 66 | |||
| 67 | This software is copyright (c) 2022 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník. | ||
| 68 | |||
| 69 | This is free software; you can redistribute it and/or modify it under | ||
| 70 | the same terms as the Perl 5 programming language system itself. | ||
| 71 | |||
| 72 | =cut | ||