From 2ebd31039f7bfedadcb9348b123dca433f57a4c1 Mon Sep 17 00:00:00 2001 From: Robin Edwards Date: Tue, 5 Oct 2010 14:58:39 +0100 Subject: merged doc --- lib/Net/Riak.pm | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'lib/Net/Riak.pm') diff --git a/lib/Net/Riak.pm b/lib/Net/Riak.pm index 156779b..ae9319e 100644 --- a/lib/Net/Riak.pm +++ b/lib/Net/Riak.pm @@ -100,17 +100,15 @@ client_id for this client =back -=head2 METHODS +=head1 METHODS -=over 4 - -=item bucket +=head2 bucket my $bucket = $client->bucket($name); Get the bucket by the specified name. Since buckets always exist, this will always return a L -=item is_alive +=head2 is_alive if (!$client->is_alive) { ... @@ -118,31 +116,32 @@ Get the bucket by the specified name. Since buckets always exist, this will alwa Check if the Riak server for this client is alive -=item add +=head2 add my $map_reduce = $client->add('bucket_name', 'key'); Start assembling a Map/Reduce operation -=item link +=head2 link my $map_reduce = $client->link(); Start assembling a Map/Reduce operation -=item map +=head2 map my $map_reduce = $client->add('bucket_name', 'key')->map("function ..."); Start assembling a Map/Reduce operation -=item reduce +=head2 reduce my $map_reduce = $client->add(..)->map(..)->reduce("function ..."); Start assembling a Map/Reduce operation -=back +=head2 SEE ALSO -=cut +Net::Riak::MapReduce +=cut -- cgit v1.2.3 From 1ae712311b2dbc48a8af751b1f81f9fb3203ed25 Mon Sep 17 00:00:00 2001 From: Robin Edwards Date: Tue, 5 Oct 2010 14:25:13 +0100 Subject: requests and responses now stored for debugging --- lib/Net/Riak.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/Net/Riak.pm') diff --git a/lib/Net/Riak.pm b/lib/Net/Riak.pm index ae9319e..77bd773 100644 --- a/lib/Net/Riak.pm +++ b/lib/Net/Riak.pm @@ -13,7 +13,7 @@ has client => ( is => 'rw', isa => 'Net::Riak::Client', required => 1, - handles => [qw/request useragent is_alive/] + handles => [qw/is_alive http_request http_response/] ); sub BUILDARGS { @@ -39,6 +39,8 @@ sub bucket { $obj->store; my $obj = $bucket->get('new_post'); + my $req = $client->http_request; # last request + $client->http_response # last response =head1 DESCRIPTION @@ -140,6 +142,14 @@ Start assembling a Map/Reduce operation Start assembling a Map/Reduce operation +=method http_request + +Returns the HTTP::Request object from the last request + +=method http_response + +Returns a HTTP::Response object from the last request + =head2 SEE ALSO Net::Riak::MapReduce -- cgit v1.2.3