NAME
Net::Blossom::Server::BlobResult - Result of a Blossom blob lookup
SYNOPSIS
use Net::Blossom::Server::BlobResult;
my $result = Net::Blossom::Server::BlobResult->new(
descriptor => $blob,
body => $bytes,
);
DESCRIPTION
Net::Blossom::Server::BlobResult describes a blob available for download. It keeps the descriptor and response body together so server routing can return the blob bytes with headers derived from the descriptor.
CONSTRUCTOR
new
my $result = Net::Blossom::Server::BlobResult->new(%args);
Required arguments:
descriptorA
Net::Blossom::BlobDescriptorfor the blob.bodyThe blob body as a scalar, an array reference of scalar chunks, or a stream object that provides
readorgetline. Scalar and array bodies must have a total byte length equal to$descriptor->size. Stream bodies are not read or buffered by this object.
Unknown arguments or invalid values croak.
ACCESSORS
descriptor
Returns the Net::Blossom::BlobDescriptor.
body
Returns the scalar, array reference, or stream object body.