diff options
author | franck cuny <franck@lumberjaph.net> | 2010-04-11 14:29:16 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-04-11 14:29:16 +0200 |
commit | 4a6bb24ac6d748ffc43c9a1149fe7ea8f995390f (patch) | |
tree | a7be96f1e17f40ab5e298812ef109ecea18e9a54 | |
parent | update makefile (diff) | |
download | anyevent-riak-4a6bb24ac6d748ffc43c9a1149fe7ea8f995390f.tar.gz |
small POD update
-rw-r--r-- | lib/AnyEvent/Riak.pm | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/lib/AnyEvent/Riak.pm b/lib/AnyEvent/Riak.pm index ad16f8a..c9c0d10 100644 --- a/lib/AnyEvent/Riak.pm +++ b/lib/AnyEvent/Riak.pm @@ -224,24 +224,18 @@ AnyEvent::Riak - Non-blocking Riak client =head1 SYNOPSIS - use AnyEvent::Riak; + use AnyEvent::Riak; - my $riak = AnyEvent::Riak->new( - host => 'http://127.0.0.1:8098', - path => 'riak', - ); + my $riak = AnyEvent::Riak->new( + host => 'http://127.0.0.1:8098', + path => 'riak', + ); + + die "Riak is not running" unless $riak->is_alive->recv; - if ( $riak->is_alive->recv ) { my $buckets = $riak->list_bucket('bucketname')->recv; my $new_bucket - = $riak->set_bucket( 'foo', { allowed_fields => '*' } )->recv; - my $store - = $riak->store( - { bucket => 'foo', key => 'bar', object => { baz => 1 }, link => [] } - )->recv; - my $fetch = $riak->fetch( 'foo', 'bar' )->recv; - my $delete = $riak->delete( 'foo', 'bar' )->recv; - } + = $riak->set_bucket( 'foo', { props => { n_val => 2 } } )->recv; For a complete description of the Riak REST API, please refer to L<https://wiki.basho.com/display/RIAK/REST+API>. |