Reflex::Signal - Generic signal observer and base class for specific ones.
version 0.010
As a callback:
use Reflex::Signal; use Reflex::Callbacks qw(cb_coderef); my $usr1 = Reflex::Signal->new( name => "USR1", on_signal => cb_coderef { print "Got SIGUSR1.\n" }, );
As a promise:
my $usr2 = Reflex::Signal->new( name => "USR2" ); while ($usr2->wait()) { print "Got SIGUSR2.\n"; }
May also be used with observers, and Reflex::Trait::Observer, but those use cases aren't shown here.
Reflex::Signal is a general signal observer. It may be used to notify programs when they are sent a signal via kill.
"name" defines the name (or number) of an interesting signal. The Reflex::Signal object will emit events when it detects that the process has been given that signal.
None at this time. Destroy the object to stop it.
Reflex::Signal and its subclasses emit just one event: "signal". Generic signals have no additional information, but specific ones may. For example, Reflex::PID (SIGCHLD) includes a process ID and information about its exit.
Moose::Manual::Concepts
Reflex Reflex::PID Reflex::POE::Wheel::Run
"ACKNOWLEDGEMENTS" in Reflex "ASSISTANCE" in Reflex "AUTHORS" in Reflex "BUGS" in Reflex "BUGS" in Reflex "CONTRIBUTORS" in Reflex "COPYRIGHT" in Reflex "LICENSE" in Reflex "TODO" in Reflex
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.