Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 26 lines (20 sloc) 0.424 kb
d75f256 @rcaputo Begin documentation.
authored
1 #!/usr/bin/env perl
5b0127b @rcaputo Remove emit() from roles.
authored
2 # vim: ts=2 sw=2 noexpandtab
d75f256 @rcaputo Begin documentation.
authored
3
4 use warnings;
5 use strict;
9e56da9 @rcaputo Add the examples to the distribution, and ensure they run in their new h...
authored
6 use lib qw(../lib);
d75f256 @rcaputo Begin documentation.
authored
7
8 {
afd7c10 @rcaputo Fix tab damage. No significant changes.
authored
9 package App;
10 use Moose;
1f5ed27 @rcaputo Rename Reflex::Role::Object to Reflex::Role::Reactive; Reflex::Object to...
authored
11 extends 'Reflex::Base';
bbf149d @rcaputo Create Reflex::Role::Interval, and reify it as Reflex::Interval. Needed...
authored
12 use Reflex::Interval;
e0d6b99 @rcaputo Explicitly export watches() and emits() from their corresponding Reflex ...
authored
13 use Reflex::Trait::Watched qw(watches);
d75f256 @rcaputo Begin documentation.
authored
14
9513af3 @rcaputo Rename "observe" to "watch".
authored
15 watches ticker => (
6eae87c @rcaputo Add "emits" and "observes" attribute declarations.
authored
16 isa => 'Reflex::Interval',
17 setup => { interval => 1, auto_repeat => 1 },
afd7c10 @rcaputo Fix tab damage. No significant changes.
authored
18 );
d75f256 @rcaputo Begin documentation.
authored
19
afd7c10 @rcaputo Fix tab damage. No significant changes.
authored
20 sub on_ticker_tick {
21 print "tick at ", scalar(localtime), "...\n";
22 }
d75f256 @rcaputo Begin documentation.
authored
23 }
24
25 exit App->new()->run_all();
Something went wrong with that request. Please try again.