Promise::ES6::IOAsync - Promises/A+-compliant promises for IO::Async
my $loop = IO::Async::Loop->new(); my $loop_guard = Promise::ES6::IOAsync::SET_LOOP($loop); # Now use Promise::ES6::IOAsync as you would plain Promise::ES6.
This module exposes the same functionality as Promise::ES6::AnyEvent but for IO::Async rather than AnyEvent.
Whereas AnyEvent assumes that an event loop is global, IO::Async allows multiple concurrent event loops. In order to accommodate this difference in architecture, this module requires an active IO::Async::Loop object before it can be used. See SET_LOOP() below.
SET_LOOP()
Sets this module’s active IO::Async::Loop object. This is a internal global; if you try to set a loop while one is already set, an exception is thrown.
This returns an opaque object that, when DESTROY()ed, will clear this module’s internal loop.
To install Promise::ES6, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Promise::ES6
CPAN shell
perl -MCPAN -e shell install Promise::ES6
For more information on module installation, please visit the detailed CPAN module installation guide.