This project has retired. For details please refer to its Attic page.
Clownfish::Blob – Apache Clownfish Documentation
Apache Lucy™

NAME

Clownfish::Blob - Immutable buffer holding arbitrary bytes.

SYNOPSIS

my $blob = Clownfish::Blob->new($byte_string);
my $byte_string = $blob->to_perl;

DESCRIPTION

CONSTRUCTORS

new

my $blob = Clownfish::Blob->new($byte_string);

Create a Blob containing the passed-in bytes.

METHODS

get_size

my $int = $blob->get_size();

Return the number of bytes held by the Blob.

compare_to

my $int = $blob->compare_to($other);

Indicate whether one Blob is less than, equal to, or greater than another. The byte contents of the Blobs are compared lexicographically. Throws an exception if other is not a Blob.

Returns: 0 if the Blobs are equal, a negative number if self is less than other, and a positive number if self is greater than other.

clone

my $result = $blob->clone();

Return a clone of the object.

INHERITANCE

Clownfish::Blob isa Clownfish::Obj.