Directo...e::Null(3)
π NAME π
Okay bestie, welcome to the Directo...e::Null(3) page β a whole User Contributed Perl Documentation moment β and todayβs main character is Directory::Queue::Null: an object oriented interface to a null directory based queue. Periodt. π
β SYNOPSIS β
use Directory::Queue::Null;
$dirq = Directory::Queue::Null->new();
foreach $count (1 .. 100) {
$name = $dirq->add(... some data ...);
}
π« DESCRIPTION π«
The goal of this module is to offer a "null" queue system using the same API as the other directory queue implementations. The queue will behave like a black hole: added data will disappear immediately so the queue will therefore always appear empty. π³οΈβ¨
This can be used for testing purposes or to discard data like one would do on Unix by redirecting output to /dev/null. Literally the queue version of βnot today, data.β π
Please refer to Directory::Queue for general information about directory queues.
π οΈ CONSTRUCTOR π οΈ
The new() method can be used to create a Directory::Queue::Null object that will later be used to interact with the queue. No attributes are supported. Simple as that, bestie. π
π METHODS π
The following methods are available:
new()β return a newDirectory::Queue::Nullobject (class method)copy()β return a copy of the objectpath()β return the queue toplevel path, that is"NULL"id()β return a unique identifier for the queue, that is"NULL"count()β return the number of elements in the queue, so always0first()β return the first element in the queue, so always an empty stringnext()β return the next element in the queue, so always an empty stringadd(DATA)β add the given data (it can be anything) to the queue, this does nothingadd_ref(REF)β add the given data reference to the queue, this does nothingadd_path(PATH)β add the given file (identified by its path) to the queue, this will therefore remove the filepurge()β purge the queue, this does nothing
The following methods are available to provide the same API as the other directory queue modules but they will always return an error as they cannot be legitimately called since the queue is always empty:
lock(ELEMENT)unlock(ELEMENT)touch(ELEMENT)remove(ELEMENT)get(ELEMENT)get_ref(ELEMENT)get_path(ELEMENT)
π«Ά Friendly reminder: those error-returning methods are not being mean to you. The queue is always empty, so there is just nothing legitimate to call them on. Itβs giving βempty group chat, no messages to react to.β π
π DIRECTORY STRUCTURE π
This module does not store any file. Not one. Zero. The storage vibe is immaculate. π¦
π SEE ALSO π
Directory::Queue, Directory::Queue::Normal, Directory::Queue::Simple. Go read those too, iykyk. π
π AUTHOR π
Lionel Cons (http://cern.ch/lionel.cons)
Copyright (C) CERN 2010-2022
π Cute little sign-off, bestie: this page came from perl v5.32.1, dated 2022-07-20, and the footer energy is Directo...e::Null(3). Bye, love you, stay null and slay. π
β¨
π¦ where this page comes from
- epel 9: perl-Directory-Queue 2.2-1.el9 Β· GPL+ or Artistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms