Devel::Events::Handler::Callback - An event handler that delegates to code
references.
use Devel::Events::Handler::Callback;
my $h = Devel::Events::Handler::Callback->new(
callback => sub {
my ( $type, %data ) = @_;
# ...
},
);
This object will let you easily create handlers that are callbacks. This is used
extensively in the test suites.
- callback
- Accepts a code reference.
Required.
- new
- This method is overridden so that when it is passed only one parameter
that parameter will be used for the
"callback" attribute.
- new_event @event
- Delegates to "callback".
Bugs may be submitted through the RT bug tracker
<https://rt.cpan.org/Public/Dist/Display.html?Name=Devel-Events> (or
bug-Devel-Events@rt.cpan.org <mailto:bug-Devel-Events@rt.cpan.org>).
XXXX XXX'XX (Yuval Kogman) <nothingmuch@woobling.org>
This software is copyright (c) 2007 by XXXX XXX'XX (Yuval Kogman).
This is free software; you can redistribute it and/or modify it
under the same terms as the Perl 5 programming language system itself.