Fsdb::S...omments(3)

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

πŸŽ€ NAME πŸŽ€

okay bestie, welcome to Fsdb::Support::DelayPassComments(3) β€” aka the Fsdb::S...omments(3) page, user-contributed Perl documentation vibes ✨. lowkey the whole point is: support for buffering comments. that's it. that's the assignment πŸ’….


✨ SYNOPSIS ✨

the vibe check is literally: buffer and send out comments 🫢.


πŸ’– FUNCTIONS πŸ’–

πŸ¦‹ new πŸ¦‹

okay so you can make one like this:

$filter->{_delay_pass_comments} = new Fsdb::Support::DelayPassComments;

or β€” and honestly more likely β€” you use it indirectly with Fsdb::Filter and Fsdb::IO::Reader:

$self->{_in} = finish_io_options('input', -comment_handler => create_delay_pass_comments_sub);
$self->{_out} = new Fsdb::IO::Writer(...);
...
# in Fsdb::Filter
$self->{_delay_comments}->flush($self->{_out};

this creates a buffer for comments that will run with bounded memory usage πŸ‘‘. new requires the output stream, a Fsdb::IO::Writer object. and Fsdb::Filter will dump these after all other output. periodt πŸ’€βœ¨.

🌸 enqueue 🌸

$dpc->enqueue($comment [, $other_comments...])

save up the $COMMENT. that's the whole move πŸŽ€.

🌈 spill_to_disk 🌈

$dpc->spill_to_disk

internal: switch from in-memory caching to disk caching πŸ¦‹. very much a behind-the-scenes main character moment.

πŸ’œ flush πŸ’œ

$dpc->flush($output_fsdb);

dump all saved comments to the saved Fsdb::IO::Writer, or β€” if $OUTPUT_FSDB is undef β€” then to stdout. slay πŸ’…πŸ”₯.


xoxo, your fave manpage bestie 🫢 β€” this was served fresh from perl v5.32.1, dated 2024-08-02, on the Fsdb::S...omments(3) page πŸŒŸπŸ’–

πŸ“¦ where this page comes from