NAME

Class::Listener - executes callbacks on events

SYNOPSIS

use Class::Listener;

{
  package My::Listener;

  @ISA = qw(Class::Listener);
}

my $l = My::Listener->new( events => { eventname => sub { } );

$l->Class::Listener::signal( 'eventname', @args );

DESCRIPTION

This class has a callback hash. It executes the subs via the signal method.

METHODS

signal( $eventname, @args )

$eventname

a key in thte events callback hash.

@args

This array is forwarded to the callback.

[Note] signal returns the resulting return value of the callback.

EXPORT

None by default.

AUTHOR

Murat Uenalan, <muenalan@cpan.org>

SEE ALSO

Class::Proxy.