I am working on some modules which use Storable to handle higher data
structures. This is mainly for some neat IPC:
# CLIENT
my $queue = Storable::Queue->new("queue.file");
$queue->push($reference_to_some_data);
# SERVER
my $queue = Storable::Queue->new("queue.file");
my $data = $queue->peek();
my @data;
if ( $$data = "FRED" ) {
my @data = $queue->pop_all();
} else {
$data = $queue->pop();
}
Anything "pushed" into the store file is kept in a queue/stack/whatever
format. Thus, you can have multiple programs pushing and popping and the
data will come out in the right order. Right now, I've called them
Storable::Queue, Storable::Stack, etc., but I've been wondering if that's
an appropriate place for them to go?
Eric