Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 23 lines (17 sloc) 0.328 kb
849cac2 Rocco Caputo Add Reflex::Role::Timeout and Reflex::Timeout.
authored
1 #!/usr/bin/env perl
5b0127b Rocco Caputo Remove emit() from roles.
authored
2 # vim: ts=2 sw=2 noexpandtab
849cac2 Rocco Caputo Add Reflex::Role::Timeout and Reflex::Timeout.
authored
3
4 use warnings;
5 use strict;
6 use lib qw(./lib ../lib ./eg);
7
8 use Reflex::Timeout;
9 use ExampleHelpers qw(eg_say);
10
11 my $to = Reflex::Timeout->new(
12 delay => 1,
13 on_done => \&handle_timeout,
14 );
15
16 Reflex->run_all();
17 exit;
18
19 sub handle_timeout {
20 eg_say "got timeout";
21 $to->reset();
22 }
Something went wrong with that request. Please try again.