Reflex::Timeout - A stand-alone single-shot delayed callback
version 0.072
#!/usr/bin/env perl use warnings; use strict; use Reflex::Timeout; my $to = Reflex::Timeout->new( delay => 1, on_done => \&handle_timeout, ); Reflex->run_all(); exit; sub handle_timeout { print "got timeout\n"; $to->reset(); }
Reflex::Timeout invokes a callback after a specified amount of time has elapsed. Timeouts may be stopped, restarted, or reset so they must again wait the full delay period. Resetting is especially useful, for example whenever input arrives.
Implemented and documented by "delay" in Reflex::Role::Timeout.
Implemented and documented by "cb_timeout" in Reflex::Role::Timeout.
Implemented and documented by "method_reset" in Reflex::Role::Timeout.
Implemented and documented by "method_start" in Reflex::Role::Timeout.
Implemented and documented by "method_stop" in Reflex::Role::Timeout.
TODO - Link to them.
Reflex Reflex::Role Reflex::Role::Interval Reflex::Role::Timeout Reflex::Role::Wakeup Reflex::Interval Reflex::Wakeup
"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.