Directory::Queue::Null - object oriented interface to a null directory based queue
use Directory::Queue::Null; $dirq = Directory::Queue::Null->new(); foreach $count (1 .. 100) { $name = $dirq->add(... some data ...); }
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.
/dev/null
Please refer to Directory::Queue for general information about directory queues.
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.
The following methods are available:
return a new Directory::Queue::Null object (class method)
return a copy of the object
return the queue toplevel path, that is NULL
NULL
return a unique identifier for the queue, that is NULL
return the number of elements in the queue, so always 0
return the first element in the queue, so always an empty string
return the next element in the queue, so always an empty string
add the given data (it can be anything) to the queue, this does nothing
add the given data reference to the queue, this does nothing
add the given file (identified by its path) to the queue, this will therefore remove the file
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:
This module does not store any file.
Directory::Queue, Directory::Queue::Normal, Directory::Queue::Simple.
Lionel Cons http://cern.ch/lionel.cons
Copyright (C) CERN 2010-2018
To install Directory::Queue, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Directory::Queue
CPAN shell
perl -MCPAN -e shell install Directory::Queue
For more information on module installation, please visit the detailed CPAN module installation guide.