Sendpage::Queue(3)

πŸ“¦
version 1.0.3 Β· 4 versions
, in alpine 3.22

πŸ’– Sendpage::Queue(3) πŸ’–

okay bestie, welcome to the Sendpage::Queue(3) page from the User Contributed Perl Documentation section. it’s giving β€œshort but useful,” and we’re keeping every crumb. ✨

🌸 NAME 🌸

Queue.pm β€” implements a simple directory-based file queue. that’s the whole name card, and honestly it ate. πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

here’s the synopsis, untouched and slaying in its natural habitat:

$queue=Sendpage::Queue->new($dir);

while ($queue->ready()) {
    $filename=$queue->file();
    $fh=$queue->getReadyFile();
    if ($can_remove_file) {
        $queue->fileToss();
    }
    else {
        $queue->fileDone();
    }
}

# open a new queue file
$fh=$queue->getNewFile();
# ... do things to the file handle here
# release the file
$queue->doneNewFile();

so yeah: you spin up a queue with Sendpage::Queue->new($dir), loop while $queue->ready(), grab $queue->file() and $queue->getReadyFile(), and then either $queue->fileToss() if $can_remove_file is true or $queue->fileDone() if it isn’t. for a new queue file you call $queue->getNewFile(), do your thing with the file handle, and release it with $queue->doneNewFile(). 🫢

πŸŽ€ DESCRIPTION πŸŽ€

this is a module for use in sendpage(1). literally that’s the description, and it’s iconic in its minimalism. 🌈

πŸ’€ BUGS πŸ’€

no cap, the bug note is just: Need to write more docs. so go write more docs, bestie β€” the docs are lowkey the main character here. 😭

πŸ‘‘ AUTHOR πŸ‘‘

Kees Cook <kees@outflux.net> β€” yes, that’s the author, and they’re serving credit where credit is due. πŸ’œ

πŸ”₯ SEE ALSO πŸ”₯

go look at all of these, iykyk:

Copyright 2000 Kees Cook.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


mwah! πŸ’‹ that’s the whole page. source/version: perl v5.40.2; date: 2024-06-10; and it’s Sendpage::Queue(3) β€” bye bestie! πŸ«ΆπŸ’–

πŸ“¦ where this page comes from