Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (18 sloc) 0.521 kb
#!/usr/bin/env perl
# Inherit Reflex without Moose. For people who don't like Moose.
use warnings;
use strict;
use lib qw(../lib);
{
package App;
use Reflex::Interval;
use base qw(Reflex::Interval);
sub on_tick {
print "tick at ", scalar(localtime), "...\n";
# Auto-repeat is defined in the callback.
# It doesn't work when we override the callback entirely.
# TODO - How can this be mitigated? after() in the role?
shift()->repeat();
}
}
exit App->new(interval => 1, auto_repeat => 1)->run_all();
Jump to Line
Something went wrong with that request. Please try again.