Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 23 lines (17 sloc) 0.376 kB
6457f05 @rcaputo Add support for a succinct promise syntax.
authored
1 #!/usr/bin/env perl
5b0127b @rcaputo Remove emit() from roles.
authored
2 # vim: ts=2 sw=2 noexpandtab
6457f05 @rcaputo Add support for a succinct promise syntax.
authored
3
4 use warnings;
5 use strict;
6
7 use lib qw(../lib);
8
bbf149d @rcaputo Create Reflex::Role::Interval, and reify it as Reflex::Interval. Nee…
authored
9 use Reflex::Interval;
6457f05 @rcaputo Add support for a succinct promise syntax.
authored
10 use ExampleHelpers qw(eg_say);
11 use ReflexPromise;
12
13 my $p = ReflexPromise->new(
bbf149d @rcaputo Create Reflex::Role::Interval, and reify it as Reflex::Interval. Nee…
authored
14 object => Reflex::Interval->new(
6457f05 @rcaputo Add support for a succinct promise syntax.
authored
15 interval => 1,
16 auto_repeat => 1,
17 )
18 );
19
5f9458c @rcaputo Rename observe() to watch(). Rename wait() to next().
authored
20 while (my $event = $p->next()) {
5c57d49 @rcaputo !!! Experiment with Reflex events being objects.
authored
21 eg_say("next() returned an event (", $event->_name(), ")");
6457f05 @rcaputo Add support for a succinct promise syntax.
authored
22 }
Something went wrong with that request. Please try again.