ZooKeeper::Watcher
A perl class for constructing the watcher contexts passed to the ZooKeeper C library.
A weak reference to the dispatcher the watcher belongs to. Needed in order for the watcher to notify the dispatcher when it has been triggered.
A perl subroutine reference. Invoked with an event hashref, when the watch is triggered by the ZooKeeper C library.
sub { my ($event) = @_; my $path = $event->{path}; my $type = $event->{type}; my $state = $event->{state}; }
To install ZooKeeper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ZooKeeper
CPAN shell
perl -MCPAN -e shell install ZooKeeper
For more information on module installation, please visit the detailed CPAN module installation guide.