Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: acf08fab98
Fetching contributors…

Cannot retrieve contributors at this time

file 33 lines (25 sloc) 0.575 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
#!/usr/bin/env perl
# vim: ts=2 sw=2 noexpandtab

# Use Reflex without Moose. For people who don't like Moose.

use warnings;
use strict;
use lib qw(../lib);

{
package App;
use Reflex::Base;
use Reflex::Interval;
use Reflex::Callbacks qw(cb_role);
use base qw(Reflex::Base);

sub BUILD {
my $self = shift;

$self->{ticker} = Reflex::Interval->new(
interval => 1,
auto_repeat => 1,
);

$self->watch($self->{ticker}, cb_role($self, "ticker"));
}

sub on_ticker_tick {
print "tick at ", scalar(localtime), "...\n";
}
}

exit App->new()->run_all();
Something went wrong with that request. Please try again.