The returned value for the request. If this is undef it might be advisable to check error status.

cas

only valid for get operations

The opaque CAS item used for atomic updates.

While the protocol itself defines CAS as a <unit64_t>, in perl it is stored as the equivalent of a pack("Q", $casval) (this is not the actual code used, but an unpack("Q", $casval) will yield the numeric value)

CAS values will always be returned for get-like functions.

<ERRNAME>

Some nice magic in this module.

Instead of doing this:

if($ret->errnum == COUCHBASE_KEY_EEXISTS) {
...
}

you can do this

if($ret->KEY_EEXISTS) {
...
}

In other words, you can call any error 'basename' (that is, the error without the COUCHBASE_ prefix) as a method on this object, and its return value will be a boolean indicating whether errnum is equal to COUCHBASE_$name