diff options
author | Robin Edwards <robin.ge@gmail.com> | 2011-04-20 14:52:42 +0100 |
---|---|---|
committer | Robin Edwards <robin.ge@gmail.com> | 2011-04-20 14:52:42 +0100 |
commit | 9ab975068e04db8f4c11f1034b7f8c15ab2a1443 (patch) | |
tree | 679867d03ccc819670b3216924b985311f6c83df /lib | |
parent | merged pbc branch to master (diff) | |
download | net-riak-9ab975068e04db8f4c11f1034b7f8c15ab2a1443.tar.gz |
storing without key only supported by REST
- added notice for this
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Net/Riak/Role/PBC/Object.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Net/Riak/Role/PBC/Object.pm b/lib/Net/Riak/Role/PBC/Object.pm index 847cac2..f1a82a5 100644 --- a/lib/Net/Riak/Role/PBC/Object.pm +++ b/lib/Net/Riak/Role/PBC/Object.pm @@ -8,6 +8,8 @@ use List::Util 'first'; sub store_object { my ($self, $w, $dw, $object) = @_; + die "Storing object without a key is not supported in the PBC interface" unless $object->key; + my $value = (ref $object->data && $object->content_type eq 'application/json') ? JSON::encode_json($object->data) : $object->data; |