1Promises::Deferred::AnyUEsveerntC(o3n)tributed Perl DocuPmreonmtiasteiso:n:Deferred::AnyEvent(3)
2
3
4
6 Promises::Deferred::AnyEvent - An implementation of Promises in Perl
7
9 version 1.04
10
12 use Promises backend => ['AnyEvent'], qw[ deferred collect ];
13
14 # ... everything else is the same
15
17 The "Promise/A+" spec strongly suggests that the callbacks given to
18 "then" should be run asynchronously (meaning in the next turn of the
19 event loop), this module provides support for doing so using the
20 AnyEvent module.
21
22 Module authors should not care which event loop will be used but
23 instead should just the Promises module directly:
24
25 package MyClass;
26
27 use Promises qw(deferred collect);
28
29 End users of the module can specify which backend to use at the start
30 of the application:
31
32 use Promises -backend => ['AnyEvent'];
33 use MyClass;
34
36 Stevan Little <stevan.little@iinteractive.com>
37
39 This software is copyright (c) 2020, 2019, 2017, 2014, 2012 by Infinity
40 Interactive, Inc.
41
42 This is free software; you can redistribute it and/or modify it under
43 the same terms as the Perl 5 programming language system itself.
44
45
46
47perl v5.32.0 2020-07-28 Promises::Deferred::AnyEvent(3)