From 4c2909de65d101e3a11c03f5f146e66cdb96628c Mon Sep 17 00:00:00 2001 From: Gavin Carr Date: Wed, 8 Sep 2010 09:48:48 +0100 Subject: change =method pod items to =item --- lib/Net/Riak.pm | 19 +++++++++++++------ lib/Net/Riak/Bucket.pm | 22 +++++++++++++--------- lib/Net/Riak/MapReduce.pm | 23 +++++++++++++++-------- lib/Net/Riak/Object.pm | 44 +++++++++++++++++++++++++------------------- 4 files changed, 66 insertions(+), 42 deletions(-) (limited to 'lib/Net') diff --git a/lib/Net/Riak.pm b/lib/Net/Riak.pm index 1fb8c21..156779b 100644 --- a/lib/Net/Riak.pm +++ b/lib/Net/Riak.pm @@ -102,13 +102,15 @@ client_id for this client =head2 METHODS -=method bucket +=over 4 + +=item bucket my $bucket = $client->bucket($name); Get the bucket by the specified name. Since buckets always exist, this will always return a L -=method is_alive +=item is_alive if (!$client->is_alive) { ... @@ -116,26 +118,31 @@ Get the bucket by the specified name. Since buckets always exist, this will alwa Check if the Riak server for this client is alive -=method add +=item add my $map_reduce = $client->add('bucket_name', 'key'); Start assembling a Map/Reduce operation -=method link +=item link my $map_reduce = $client->link(); Start assembling a Map/Reduce operation -=method map +=item map my $map_reduce = $client->add('bucket_name', 'key')->map("function ..."); Start assembling a Map/Reduce operation -=method reduce +=item reduce my $map_reduce = $client->add(..)->map(..)->reduce("function ..."); Start assembling a Map/Reduce operation + +=back + +=cut + diff --git a/lib/Net/Riak/Bucket.pm b/lib/Net/Riak/Bucket.pm index b8a0a36..06cd508 100644 --- a/lib/Net/Riak/Bucket.pm +++ b/lib/Net/Riak/Bucket.pm @@ -180,31 +180,33 @@ DW value setting for this client (default 2) =head2 METHODS -=method new_object +=over 4 + +=item new_object my $obj = $bucket->new_object($key, $data, @args); Create a new L object. Additional Object constructor arguments can be passed after $data. If $data is a reference and no explicit Object content_type is given in @args, the data will be serialised and stored as JSON. -=method get +=item get my $obj = $bucket->get($key, [$r]); Retrieve an object from Riak. -=method n_val +=item n_val my $n_val = $bucket->n_val; Get/set the N-value for this bucket, which is the number of replicas that will be written of each object in the bucket. Set this once before you write any data to the bucket, and never change it again, otherwise unpredictable things could happen. This should only be used if you know what you are doing. -=method allow_multiples +=item allow_multiples $bucket->allow_multiples(1|0); If set to True, then writes with conflicting data will be stored and returned to the client. This situation can be detected by calling has_siblings() and get_siblings(). This should only be used if you know what you are doing. -=method get_keys +=item get_keys my $keys = $bucket->get_keys; my $keys = $bucket->get_keys($args); @@ -219,23 +221,23 @@ Use 'keys=stream' streaming mode to fetch the list of keys, which may be faster =back -=method set_property +=item set_property $bucket->set_property({n_val => 2}); Set a bucket property. This should only be used if you know what you are doing. -=method get_property +=item get_property my $prop = $bucket->get_property('n_val'); Retrieve a bucket property. -=method set_properties +=item set_properties Set multiple bucket properties in one call. This should only be used if you know what you are doing. -=method get_properties +=item get_properties Retrieve an associative array of all bucket properties, containing 'props' and 'keys' elements. @@ -245,4 +247,6 @@ Accepts a hashref of parameters, containing flags for 'props' and 'keys'. By def The 'props' parameter may be 'true' or 'false'. The 'keys' parameter may be 'false' or 'true' or 'stream', to get the keys back in streaming mode (which may be faster for large keyspaces). +=back + =cut diff --git a/lib/Net/Riak/MapReduce.pm b/lib/Net/Riak/MapReduce.pm index 057f74e..f1a50a6 100644 --- a/lib/Net/Riak/MapReduce.pm +++ b/lib/Net/Riak/MapReduce.pm @@ -201,20 +201,27 @@ sub run { =head2 METHODS -=method add +=over 4 + +=item add Add inputs to a map/reduce operation. This method takes three different forms, depending on the provided inputs. You can specify either a RiakObject, a string bucket name, or a bucket, key, and additional arg. -=method add_object +=item add_object + +=item add_bucket_key_data -=method add_bucket_key_data +=item add_bucket -=method add_bucket +=item link -=method link +=item map -=method map +=item reduce + +=item run + +=back -=method reduce +=cut -=method run diff --git a/lib/Net/Riak/Object.pm b/lib/Net/Riak/Object.pm index 59ecde1..ba9f475 100644 --- a/lib/Net/Riak/Object.pm +++ b/lib/Net/Riak/Object.pm @@ -343,29 +343,31 @@ Return an array of Siblings =head2 METHODS -=method count_links +=over 4 + +=item count_links Return the number of links -=method append_link +=item append_link Add a new link -=method get_siblings +=item get_siblings Return the number of siblings -=method add_sibling +=item add_sibling Add a new sibling -=method count_siblings +=item count_siblings -=method get_sibling +=item get_sibling Return a sibling -=method store +=item store $obj->store($w, $dw); @@ -383,7 +385,7 @@ DW-value, wait for this many partitions to confirm the write before returning to =back -=method load +=item load $obj->load($w); @@ -397,7 +399,7 @@ R-Value, wait for this many partitions to respond before returning to client. =back -=method delete +=item delete $obj->delete($dw); @@ -411,52 +413,56 @@ DW-value. Wait until this many partitions have deleted the object before respond =back -=method clear +=item clear $obj->reset; Reset this object -=method has_siblings +=item has_siblings if ($obj->has_siblings) { ... } Return true if this object has siblings -=method has_no_siblings +=item has_no_siblings if ($obj->has_no_siblings) { ... } Return true if this object has no siblings -=method populate +=item populate Given the output of RiakUtils.http_request and a list of statuses, populate the object. Only for use by the Riak client library. -=method add_link +=item add_link $obj->add_link($obj2, "tag"); Add a link to a L -=method remove_link +=item remove_link $obj->remove_link($obj2, "tag"); Remove a link to a L -=method add +=item add Start assembling a Map/Reduce operation -=method link +=item link Start assembling a Map/Reduce operation -=method map +=item map Start assembling a Map/Reduce operation -=method reduce +=item reduce Start assembling a Map/Reduce operation + +=back + +=cut -- cgit 1.4.1