NAME
App::mirai::Future - injects debugging code into Future
VERSION
version 0.003
DESCRIPTION
On load, this will monkey-patch Future to provide various precarious hooks for Future-related events.
create_watcher
Returns a new App::mirai::Watcher.
my $watcher = App::mirai::Future->create_watcher;
$watcher->subscribe_to_event(
create => sub { my ($ev, $f) = @_; warn "Created new future: $f\n" },
);
delete_watcher
Deletes the given watcher.
my $watcher = App::mirai::Future->create_watcher;
App::mirai::Future->delete_watcher($watcher);
future
Returns information about the given Future instance.
futures
Returns all the Futures we know about.
MONKEY PATCHES
These reach deep into Future and are likely to break any time a new version is released.
Future::DESTROY
Hook destruction so we know when a Future is going away.
Future::set_label
Pick up any label changes, since Futures are created without them.
AUTHOR
Tom Molesworth <cpan@perlsite.co.uk>
LICENSE
Copyright Tom Molesworth 2014-2015. Licensed under the same terms as Perl itself.