The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Fsdb::IO::Replayable - support for buffering fsdb rows

SYNOPSIS

Buffer and replaying fsdb rows

FUNCTIONS

new

    $replayable = new Fsdb::IO::Replayable(-writer_args => \@writer_args,
        -reader_args => \@reader_args);
    $writer = $replayable->writer;
    $replayable->close;  # warning: close replayable, NOT writer
    $reader = $replayable->reader;

Creates a buffer for Fsdb::IO objects that will run with bounded memory usage. After you close it, you can replay it one or more times by opening readers.

Arguments to the new method:

-writer_args => @arref Gives arguments to pass to Fsdb::IO::Writer to make a new stream.
-reader_args => @arref Gives arguments to pass to Fsdb::IO::Reader to make a new stream.
-tmpdir => $dirname Specifies wher tmpfiles go.

writer

    $writer = $replayable->writer;

Return a fsdb writer object. If the file was written already, resets it for rewriting.

close

    $replayable->close;

Close the replayable for writing. Closes the writer object, if any. Allows reading to start.

reader

    $reader = $replayable->reader;

Return a fsdb reader object to re-read the file. Can be called once.

The caller is expected to close and discard any readers.