The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Couchbase - Perl client for Couchbase

This is the Couchbase client for Perl. It replaces the older Couchbase::Client.

It depends on libcouchbases.

SYNOPSIS

    use Couchbase;
    my $cluster = Couchbase::Cluster->new("couchbase://host1,host2,host3");
    my $bkt_defl = $cluster->open_bucket("default");
    my $bkt_beer = $cluster->open_bucket("beer-sample");
    my $bkt_other = $cluster->open("other_bucket?config_cache=/foo/bar/baz.cache");

DESCRIPTION

The Couchbase::Cluster class represents a top level object which can be used to store common connection settings about an Couchbase::Bucket.

CONSTRUCTOR

The constructor accepts a URI-like format (see the constructor for Couchbase::Bucket), but without the bucket name itself being specified.

open_bucket

This returns a connected bucket based on the bucket name. The bucket name itself may be followed by a ? and several options, (like the connection string itself).

If an open bucket already exists with the given connection string, that bucket is returned rather than opening a new one.

SEE ALSO

Couchbase::Bucket - Main bucket class.