Dancer2::Plugin::Queue::Array - Single-process, in-memory queue
version 0.006
# in dancer config.yml queue: default: class: Array options: name: test
This module provides a trivial, single-process, in-memory queue for testing.
The name attribute does nothing useful, but it's required in order to test how options are passed to queue implementations
name
$queue->add_msg( $data );
Enqueues $data as a message.
my ($msg, $data) = $queue->get_msg;
Dequeues a message.
$queue->remove_msg( $msg );
Usually would remove a message from the queue as deleted, but for this demo class, does nothing, since get_msg already removed it.
get_msg
David Golden <dagolden@cpan.org>
This software is Copyright (c) 2012 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install Dancer2::Plugin::Queue, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer2::Plugin::Queue
CPAN shell
perl -MCPAN -e shell install Dancer2::Plugin::Queue
For more information on module installation, please visit the detailed CPAN module installation guide.