1 | BEGIN { $| = 1; print "1..1\n"; } |
1 | BEGIN { $| = 1; print "1..5\n"; } |
2 | END {print "not ok 1\n" unless $loaded;} |
2 | |
3 | use Libevent; |
3 | BEGIN { |
4 | $loaded = 1; |
4 | $^W = 0; # work around some bugs in perl |
|
|
5 | |
|
|
6 | print eval { require EV } ? "" : "not ", "ok 1 # $@\n"; |
|
|
7 | print eval { require EV::MakeMaker } ? "" : "not ", "ok 2 # $@\n"; |
|
|
8 | } |
|
|
9 | |
|
|
10 | my $w = EV::idle sub { print "not ok 3\n"; $_[0]->stop }; |
|
|
11 | $w->feed_event (EV::CUSTOM); |
|
|
12 | $w->stop; |
|
|
13 | EV::loop; |
5 | print "ok 1\n"; |
14 | print "ok 3\n"; |
|
|
15 | |
|
|
16 | my $w = EV::idle sub { print "ok 4\n"; $_[0]->stop }; |
|
|
17 | $w->feed_event (EV::CUSTOM); |
|
|
18 | $w->clear_pending; |
|
|
19 | EV::loop; |
|
|
20 | print "ok 5\n"; |