Evo::Promise::AE
version 0.0405
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.
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;
alexbyk.com
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.
To install Evo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Evo
CPAN shell
perl -MCPAN -e shell install Evo
For more information on module installation, please visit the detailed CPAN module installation guide.