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

MogileFS::Client::CallbackFile

SYNOPSIS

my $mogfs = MogileFS::Client::Callback->new( ... )

open(my $read_fh, "<", "...") or die ...
my $eventual_length = -s $read_fh;
my $f = $mogfs->store_file_from_fh($key, $class, $read_fh, $eventual_length, \%opts);

$f->($eventual_length, 0);

$f->("", 1); # indicate EOF

DESCRIPTION

This package inherits from MogileFS::Client::Async and provides an additional blocking API in which the data you wish to upload is read from a file when commanded by a callback function. function, allowing other processing to take place on data as you read it from disc or elsewhere.

SEE ALSO

MogileFS::Client::Async