/
HigherOrder.pm
52 lines (29 loc) · 997 Bytes
/
HigherOrder.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package Mojo::Promise::Role::HigherOrder;
use Mojo::Base '-role';
use strict;
our $VERSION = '1.006';
=encoding utf8
=head1 NAME
Mojo::Promise::Role::HigherOrder - Fulfill with the first fulfilled promise
=head1 SYNOPSIS
use Mojo::Promise;
use Mojo::Promise::Role::HigherOrder;
my $any_promise = Mojo::Promise
->with_roles( '+Any' ) # or +None or +Some
->any( @promises );
=head1 DESCRIPTION
This module is an umbrella for L<Mojo::Promise::Role::Any>,
L<Mojo::Promise::Role::None>, and L<Mojo::Promise::Role::Some>.
=head1 SEE ALSO
L<Mojolicious>, L<Mojo::Promise>, L<Role::Tiny>
L<http://bluebirdjs.com/docs/api/promise.any.html>
=head1 SOURCE AVAILABILITY
This source is in Github:
https://github.com/briandfoy/mojo-promise-role-higherorder
=head1 AUTHOR
brian d foy, C<< <briandfoy@pobox.com> >>
=head1 COPYRIGHT AND LICENSE
Copyright © 2018-2024, brian d foy, All Rights Reserved.
You may redistribute this under the terms of the Artistic License 2.0.
=cut
1;