NAME

Event::Distributor::_Event - base class for Event::Distributor events

DESCRIPTION

This class is the base from which the following actual classes are derived:

Instances of this class shouldn't be directly created by end-user code, but it is documented here in order to list the shared methods available on all the subclasses.

METHODS

subscribe

$event->subscribe( $code )

Adds a new CODE reference that subscribes to the event. This code is expected to return a Future instance.

subscribers

@codes = $event->subscribers

Returns a list of CODE references previously subscribed.

EXPECTED METHODS

Subclasses are expected to implement the following methods:

fire

$f = $event->fire( @args )

Invoked by Event::Distributor to actually run the signal. This is expected to invoke any or all subscribers in whatever manner it implements, passing arguments as required, and collecting results in some way to provide as the eventual answer of the Future it returns.

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>