Reflex::Wakeup - A stand-alone single-shot callback at an absolute time
version 0.060
#!/usr/bin/env perl use warnings; use strict; use Reflex::Wakeup; my @wakeups; my $ding = 0; for my $delay (1..5) { push @wakeups, Reflex::Wakeup->new( when => time() + $delay, on_time => sub { print "got wakeup $delay\n"; @wakeups = () if ++$ding >= @wakeups; }, ); } Reflex->run_all(); exit;
Reflex::Wakeup invokes a callback at a specific absolute UNIX epoch time. Wakeup timers may be stopped and reset.
Implemented and documented by "when" in Reflex::Role::Wakeup.
Implemented and documented by "cb_wakeup" in Reflex::Role::Wakeup.
Implemented and documented by "method_reset" in Reflex::Role::Wakeup.
Implemented and documented by "method_stop" in Reflex::Role::Interval.
TODO - Many. Link to them.
Reflex Reflex::Role Reflex::Role::Interval Reflex::Role::Timeout Reflex::Role::Wakeup Reflex::Interval Reflex::Timeout
"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.