Revision: | 1.6 |
Committed: | Tue Jul 30 23:14:33 2013 UTC (11 years, 4 months ago) by root |
Content type: | application/x-troff |
Branch: | MAIN |
CVS Tags: | rel-7_05, rel-7_07, rel-7_08, rel-7_09, rel-7_16, rel-7_15, rel-7_14, rel-7_13, rel-7_12, rel-7_11, HEAD |
Changes since 1.5: | +1 -0 lines |
Log Message: | *** empty log message *** |
# | Content |
---|---|
1 | use AnyEvent; |
2 | |
3 | BEGIN { $^W = 0 } |
4 | BEGIN { $ENV{PERL_ANYEVENT_LOOP_TESTS} or ((print qq{1..0 # SKIP PERL_ANYEVENT_LOOP_TESTS not true\n}), exit 0) } |
5 | BEGIN { eval q{use AnyEvent::Impl::Event;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::Event not loadable\n}), exit 0) } |
6 | |
7 | |
8 | |
9 | $| = 1; print "1..6\n"; |
10 | |
11 | print "ok 1\n"; |
12 | |
13 | my $cv = AnyEvent->condvar; |
14 | |
15 | print "ok 2\n"; |
16 | |
17 | my $timer1 = AnyEvent->timer (after => 0.1, cb => sub { print "ok 5\n"; $cv->broadcast }); |
18 | |
19 | print "ok 3\n"; |
20 | |
21 | AnyEvent->timer (after => 0.01, cb => sub { print "not ok 5\n" }); |
22 | |
23 | print "ok 4\n"; |
24 | |
25 | $cv->wait; |
26 | |
27 | print "ok 6\n"; |
28 |