);
$client->is_alive() or die "riak is not alive";
# store hashref. will be serialized as JSON
$client->put( 'bucket_name', 'key_name', { some => 'structure' } );
# store text
$client->
ue as first argument. If the content_type
of the fetched value is C<'application/json'>, automatically decodes the JSON
into a Perl structure. If you need the raw data you can use C<get_raw>.
=head2
client->get_raw($bucket, $key, $coderef);
Same as C<get>, but no automatic JSON decoding will be performed. If you want
JSON to be automatically decoded, you should use C<get()> instead.
=head2 put(
s qw(compile);
use Types::Standard -types;
use Errno qw(EINTR);
use Scalar::Util qw(blessed);
use JSON::XS;
use Carp;
$Carp::Internal{ (__PACKAGE__) }++;
use Module::Runtime qw(use_module);
require by
xes, $links ) = $check->(@_);
($content_type //= 'application/json')
eq 'application/json'
and $value = encode_json($value);
$self->_store( $bucket, $key, $value, $content_type
if we need to decode
$args->{decode} && ($content_type // '') eq 'application/json'
and return \decode_json($value);
# simply return the value
return \$value;
}
sub _store {
m