Fsdb::I...layable(3)

πŸ“¦
version 3.9 Β· 3 versions
, in epel 9

✨ NAME ✨

Fsdb::IO::Replayable β€” support for buffering fsdb rows. That's the whole serve. This is the Fsdb::I...layable(3) page in the User Contributed Perl Documentation, and bestie, it's literally about buffering and replaying fsdb rows. 🫢

πŸ¦‹ SYNOPSIS πŸ¦‹

Buffer and replaying fsdb rows. Short, sweet, already giving main-character energy. πŸŽ€

🌸 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;

Okay so this 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. It's giving replay-button energy, iykyk. πŸ’…

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 where tmpfiles go.
⚠️ Warning from the code: close the replayable, NOT the writer. Do not come for me if you mix that up, bestie. πŸ’€

πŸ’… writer πŸ’…

$writer = $replayable->writer;

Returns a fsdb writer object. If the file was written already, it resets it for rewriting. Slay β€” rewind and go again. πŸ”

πŸ”₯ close πŸ”₯

$replayable->close;

Closes the replayable for writing. Closes the writer object, if any. Allows reading to start. So like, finish writing, then the readers can pull up. Periodt. πŸ’–

🫢 reader 🫢

$reader = $replayable->reader;

Returns a fsdb reader object to re-read the file. Can be called once. The caller is expected to close and discard any readers. No cap β€” one reader call, and you gotta clean up after yourself. 🧚


pout πŸŽ€ That's the whole page, bestie. Brought to you by perl v5.32.1, dated 2024-08-02, and filed under Fsdb::I...layable(3). Byeee! πŸ‘‘βœ¨

πŸ“¦ where this page comes from