Data-Monad-CondVar
view release on metacpan or search on metacpan
Data::Monad::CondVar adds monadic operations to AnyEvent::CondVar.
Since this module extends AnyEvent::CondVar directly, you can call
monadic methods anywhere there are CondVars.
This module is marked EXPERIMENTAL. API could be changed without any
notice.
METHODS
$cv = as_cv($cb->($cv))
A helper for rewriting functions using callbacks to ones returning
CVs.
my $cv = as_cv { http_get "http://google.ne.jp", $_[0] };
my ($data, $headers) = $cv->recv;
$cv = cv_unit(@vs)
$cv = cv_zero()
$cv = cv_fail($v)
$f = cv_flat_map_multi(\&f, $cv1, $cv2, ...)
$f = cv_map_multi(\&f, $cv1, $cv2, ...)
lib/Data/Monad/CondVar.pm view on Meta::CPAN
methods anywhere there are CondVars.
This module is marked B<EXPERIMENTAL>. API could be changed without any notice.
=head1 METHODS
=over 4
=item $cv = as_cv($cb->($cv))
A helper for rewriting functions using callbacks to ones returning CVs.
my $cv = as_cv { http_get "http://google.ne.jp", $_[0] };
my ($data, $headers) = $cv->recv;
=item $cv = cv_unit(@vs)
=item $cv = cv_zero()
=item $cv = cv_fail($v)
( run in 0.271 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )