RxPerl::AnyEvent - AnyEvent adapter for RxPerl
use RxPerl::AnyEvent ':all'; use AnyEvent; sub make_observer ($i) { return { next => sub {say "next #$i: ", $_[0]}, error => sub {say "error #$i: ", $_[0]}, complete => sub {say "complete #$i"}, }; } my $o = rx_interval(0.7)->pipe( op_map(sub {$_[0] * 2}), op_take_until( rx_timer(5) ), ); $o->subscribe(make_observer(1)); AnyEvent->condvar->recv;
RxPerl::AnyEvent is a module that lets you use the RxPerl Reactive Extensions in your AnyEvent app.
The documentation at RxPerl applies to this module too.
You can start receiving emails for new releases of this, or other, modules, over at https://perlmodules.net.
Copyright (C) Karelcom OÜ.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Alexander Karelas <karjala@cpan.org>
To install RxPerl::AnyEvent, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RxPerl::AnyEvent
CPAN shell
perl -MCPAN -e shell install RxPerl::AnyEvent
For more information on module installation, please visit the detailed CPAN module installation guide.