AnyEvent-Promise

 view release on metacpan or  search on metacpan

lib/AnyEvent/Promise.pm  view on Meta::CPAN


Start promise chain with callback C<$cb>. This function is a shortcut to
L<AnyEvent::Promise::new|/new>, and returns a promise object with the callback
attached.

=cut
sub promise { AnyEvent::Promise->new(@_) }

sub import {
    no strict 'refs';  ## no critic (ProhibitNoStrict)
    *{caller() . '::promise'} = \&promise;
}

=head1 METHODS

=head2 new($cb)

Create an instance of a promise, start the chain off with callback C<$cb>. See
L</then> for information on passing in a callback and condvar.

=cut



( run in 0.639 second using v1.01-cache-2.11-cpan-b61123c0432 )