AnyEvent::Net::Amazon::S3::Client::Bucket - An easy-to-use Amazon S3 client bucket
version v0.01.0.57
# return the bucket name print $bucket->name . "\n"; # return the bucket location constraint print "Bucket is in the " . $bucket->location_constraint . "\n"; # return the ACL XML my $acl = $bucket->acl; # list objects in the bucket # this returns a L<Data::Stream::Bulk> object which returns a # stream of L<AnyEvent::Net::Amazon::S3::Client::Object> objects, as it may # have to issue multiple API requests my $stream = $bucket->list; until ( $stream->is_done ) { foreach my $object ( $stream->items ) { ... } } # or list by a prefix my $prefix_stream = $bucket->list( { prefix => 'logs/' } ); # returns a L<AnyEvent::Net::Amazon::S3::Client::Object>, which can then # be used to get or put my $object = $bucket->object( key => 'this is the key' ); # delete the bucket (it must be empty) $bucket->delete;
This module represents buckets.
This module provides the same interface as Net::Amazon::S3::Client::Bucket. In addition, some asynchronous methods returning AnyEvent condition variable are added.
All Net::Amazon::S3::Client::Bucket methods are available. In addition, there are the following asynchronous methods. Arguments of the methods are identical as original but return value becomes AnyEvent condition variable. You can get actual return value by calling shift->recv().
shift->recv()
Yasutaka ATARASHI <yakex@cpan.org>
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install AnyEvent::Net::Amazon::S3, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::Net::Amazon::S3
CPAN shell
perl -MCPAN -e shell install AnyEvent::Net::Amazon::S3
For more information on module installation, please visit the detailed CPAN module installation guide.