Reflex::Role::Reactive Has the cb() member. BUILD Maps constructor parameters to callbacks. Maps callback types to watchers: discrete callbacks = discrete watchers role callbacks = role watchers no callbacks = unwatched (promise?)
emit() syntax is preserved. 1. Role::Reactive handles it normally. 2. Local delivery is through the callback object.
$self->emit( event => \%args );
The current syntax is too verbose.
$watcher has no purpose except to call watch().
Perhaps $watcher could be replaced by a Promise class that watches and then returns events? Similar to PromiseThing in eg-25-rcb-promise.pl?
To install Reflex, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Reflex
CPAN shell
perl -MCPAN -e shell install Reflex
For more information on module installation, please visit the detailed CPAN module installation guide.