
Class::Listener - executes methods on events

use Class::Listener;
{
package My::Listener;
our @ISA = qw(Class::Listener);
sub new
{
bless [], 'My::Listener';
}
sub _on_event
{
print "event received";
}
}
my $l = My::Listener->new();
# call '_on_event' method
$l->Class::Listener::signal( 'event', @args );

A base class which listenes for signals and runs methods.
A method with the name "_on_$eventname" will be called (if it exists).
This array is forwarded to the callback.
[Note] signal returns the resulting return value of the callback.
None by default.

Murat Uenalan, <muenalan@cpan.org>
