Module::New::Queue - Module::New::Queue documentation


Module-New documentation  | view source Contained in the Module-New distribution.

Index


NAME

Top

Module::New::Queue

SYNOPSIS

Top

  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

Top

Used internally to register commands.

METHODS

Top

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

Top

Kenichi Ishigaki, <ishigaki@cpan.org>

COPYRIGHT AND LICENSE

Top


Module-New documentation  | view source Contained in the Module-New distribution.