++ed by:
AWNCORP

1 PAUSE user

Mark Nunberg
and 1 contributors

NAME

Couchbase::Settings - Settings for a Couchbase::Bucket

SYNOPSIS

    my $settings = $bucket->settings();
    $settings->{operation_timeout} = 5.0;

    # Or
    $bucket->settings->{json_encoder} = sub { encode_json(shift) };

DESCRIPTION

This object represents a tied hash which can modify settings for an Couchbase::Bucket. Being a hash, the values can be localized per-operation using Perl's local operator.

SETTINGS

The following contains a list of setting keys and their accepted values:

operation_timeout

The default timeout for the library when trying to perform simple document operations. This accepts a timeout value in seconds (fractional seconds are also allows)

view_timeout

The default timeout for the library when trying to read data from a view query. This accepts a timeout value in seconds.

bucket

This read only setting returns the name of the bucket this Couchbase::Bucket is connected to.

json_encoder

Takes a subroutine reference which returns an encoded JSON string from a Perl object. This may be used if you wish to use an alternate JSON encoder. The function is passed a single argument, which is a reference (or simple scalar) to encode.

json_decoder

Takes a subroutine reference which decodes JSON. It is passed a single argument which is the JSON encoded string to decode.