NAME
Module::New::Queue
SYNOPSIS
use Module::New::Queue;
Module::New::Queue->register(sub { print "global\n" });
Module::New::Queue->localize(sub {
Module::New::Queue->register(sub { print "local\n" });
Module::New::Queue->consume(@args); # consume local queue
});
Module::New::Queue->consume(@args); # consume global queue
DESCRIPTION
Used internally to register commands.
METHODS
localize
runs a code reference with a localized queue.
register
register a code reference to the queue.
consume
consumes the code references in the queue.
queue
returns an array of the registered code references.
clear
clears the queue.
AUTHOR
Kenichi Ishigaki, <ishigaki@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2009 by Kenichi Ishigaki.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.