AnyEvent::Net::Amazon::S3::Client - An easy-to-use Amazon S3 client with AnyEvent
version v0.04.0.80
my $s3 = AnyEvent::Net::Amazon::S3->new( aws_access_key_id => $aws_access_key_id, aws_secret_access_key => $aws_secret_access_key, retry => 1, ); my $client = AnyEvent::Net::Amazon::S3::Client->new( s3 => $s3 ); # list all my buckets # returns a list of L<AnyEvent::Net::Amazon::S3::Client::Bucket> objects my @buckets = $client->buckets; foreach my $bucket (@buckets) { print $bucket->name . "\n"; } # create a new bucket # returns a L<AnyEvent::Net::Amazon::S3::Client::Bucket> object my $bucket = $client->create_bucket( name => $bucket_name, acl_short => 'private', location_constraint => 'US', ); # or use an existing bucket # returns a L<AnyEvent::Net::Amazon::S3::Client::Bucket> object my $bucket = $client->bucket( name => $bucket_name );
This module provides the same interface as Net::Amazon::S3::Client. In addition, some asynchronous methods returning AnyEvent condition variable are added.
WARNING: Original Net::Amazon::S3::Client says that it is an early release of the Client classes, the APIs may change.
All Net::Amazon::S3::Client 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()
AnyEvent::Net::Amazon::S3
Net::Amazaon::S3::Client - Based on it as original.
Module::AnyEvent::Helper - Used by this module. There are some description for needs of _async methods.
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.