1Promises::Promise(3) User Contributed Perl Documentation Promises::Promise(3)
2
3
4
6 Promises::Promise - An implementation of Promises in Perl
7
9 version 1.04
10
12 Promise objects are typically not created by hand, they are typically
13 returned from the "promise" method of a Promises::Deferred instance. It
14 is best to think of a Promises::Promise instance as a handle for
15 Promises::Deferred instances.
16
17 Most of the documentation here points back to the documentation in the
18 Promises::Deferred module.
19
20 Additionally Promises::Cookbook::GentleIntro contains a long
21 explanation of how this module, and all its components are meant to
22 work together.
23
25 "new( $deferred )"
26 The constructor only takes one parameter and that is an instance of
27 Promises::Deferred that you want this object to proxy.
28
29 "then( $callback, $error )"
30 This calls "then" on the proxied Promises::Deferred instance.
31
32 "chain( @thens )"
33 This calls "chain" on the proxied Promises::Deferred instance.
34
35 "catch( $error )"
36 This calls "catch" on the proxied Promises::Deferred instance.
37
38 "done( $callback, $error )"
39 This calls "done" on the proxied Promises::Deferred instance.
40
41 "finally( $callback )"
42 This calls "finally" on the proxied Promises::Deferred instance.
43
44 "timeout( $seconds )"
45 This calls "timeout" on the proxied Promises::Deferred instance.
46
47 "status"
48 This calls "status" on the proxied Promises::Deferred instance.
49
50 "result"
51 This calls "result" on the proxied Promises::Deferred instance.
52
53 "is_unfulfilled"
54 This calls "is_unfulfilled" on the proxied Promises::Deferred
55 instance.
56
57 "is_fulfilled"
58 This calls "is_fulfilled" on the proxied Promises::Deferred
59 instance.
60
61 "is_failed"
62 This calls "is_failed" on the proxied Promises::Deferred instance.
63
64 "is_in_progress"
65 This calls "is_in_progress" on the proxied Promises::Deferred
66 instance.
67
68 "is_resolved"
69 This calls "is_resolved" on the proxied Promises::Deferred
70 instance.
71
72 "is_rejected"
73 This calls "is_rejected" on the proxied Promises::Deferred
74 instance.
75
76 "is_done"
77 This calls "is_done" on the proxied Promises::Deferred instance.
78
80 Stevan Little <stevan.little@iinteractive.com>
81
83 This software is copyright (c) 2020, 2019, 2017, 2014, 2012 by Infinity
84 Interactive, Inc.
85
86 This is free software; you can redistribute it and/or modify it under
87 the same terms as the Perl 5 programming language system itself.
88
89
90
91perl v5.34.0 2022-01-21 Promises::Promise(3)