Module::New::Queue
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
Used internally to register commands.
runs a code reference with a localized queue.
register a code reference to the queue.
consumes the code references in the queue.
returns an array of the registered code references.
clears the queue.
Kenichi Ishigaki, <ishigaki@cpan.org>
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.
To install Module::New, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Module::New
CPAN shell
perl -MCPAN -e shell install Module::New
For more information on module installation, please visit the detailed CPAN module installation guide.