NAME
Evo::Promise::AE
VERSION
version 0.0260
DESCRIPTION
Promises/A+ for AE - install AnyEvent it to use this module.
See Evo::Promise::Mojo for documentation (it's the same) and Mojo::Pua for more real-world examples.
See also Evo::Promise::Role, this class is based on it.
SYNOSIS
use Evo '-Promise::AE *';
my $cv = AE::cv;
my $w;
sub load_later($url) {
my $d = deferred();
$w = AE::timer(1, 0, sub { $d->resolve("HELLO: $url") });
$d->promise;
}
load_later('http://alexbyk.com')->then(sub($v) { say $v })->finally(sub { $cv->send });
$cv->recv;
AUTHOR
alexbyk.com
COPYRIGHT AND LICENSE
This software is copyright (c) 2016 by alexbyk.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.