diff options
Diffstat (limited to '')
-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; |