BusyBird::Watcher - interface for watcher objects
my $watcher = $timeline->watch_unacked_counts( assumed => { total => 0 }, callback => sub { ... } ); $watcher->active; ## returns true if the $watcher is active $watcher->cancel(); ## cancels the $watcher
This is an interface (or role) class for watcher objects. A watcher is something that represents a callback registered somewhere. Users can use a watcher to cancel (i.e. unregister) the callback.
BusyBird::Watcher does not implement any method. Implementations of BusyBird::Watcher must be a subclass of BusyBird::Watcher and implement the following methods.
Returns true if the $watcher is active. Returns false otherwise.
$watcher
An active watcher is the one whose callback can be called. On the other hand, the callback of an inactive watcher will never be called.
Cancels the $watcher, that is, makes it inactive.
If $watcher is already inactive, it stays inactive.
Toshio Ito <toshioito [at] cpan.org>
<toshioito [at] cpan.org>
To install BusyBird, copy and paste the appropriate command in to your terminal.
cpanm
cpanm BusyBird
CPAN shell
perl -MCPAN -e shell install BusyBird
For more information on module installation, please visit the detailed CPAN module installation guide.