MooseX::Callbacks - Add ability to register and call callbacks with a role.
Version 0.01
package Foo; use Moose; with 'MooseX::Callbacks'; ... my $foo = Foo->new; $foo->register_callbacks(ding => \&dong); $foo->dispatch('ding', $arg1, $arg2...);
Hashref of arrayrefs of callbacks. Delegates via native traits set_callbacks, get_callbacks, clear_callbacks, has_callbacks
set_callbacks
get_callbacks
clear_callbacks
has_callbacks
Same as register_callbacks
register_callbacks
Registers callbacks for given events. Should be coderefs.
Calls callbacks for $event with @args as parameters.
Ability to unregister callbacks.
Mischa Spiegelmock, <revmischa at cpan.org>
<revmischa at cpan.org>
You can find documentation for this module with the perldoc command.
perldoc MooseX::Callbacks
Nobody.
Copyright 2012 Mischa Spiegelmock.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install MooseX::Callbacks, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::Callbacks
CPAN shell
perl -MCPAN -e shell install MooseX::Callbacks
For more information on module installation, please visit the detailed CPAN module installation guide.