1 | use POSIX (); |
1 | use POSIX (); |
2 | |
2 | |
3 | no warnings; |
3 | no warnings; |
4 | |
|
|
5 | use AnyEvent; |
|
|
6 | BEGIN { eval q{use AnyEvent::Impl::POE;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::POE not found}), exit 0) } $^W = 0; |
|
|
7 | |
4 | |
8 | BEGIN { |
5 | BEGIN { |
9 | # check for broken perls |
6 | # check for broken perls |
10 | if ($^O =~ /mswin32/i) { |
7 | if ($^O =~ /mswin32/i) { |
11 | my $ok; |
8 | my $ok; |
12 | local $SIG{CHLD} = sub { $ok = 1 }; |
9 | local $SIG{CHLD} = sub { $ok = 1 }; |
13 | kill 'CHLD', 0; |
10 | kill 'CHLD', 0; |
14 | |
11 | |
15 | unless ($ok) { |
12 | unless ($ok) { |
16 | print <<EOF; |
13 | print <<EOF; |
17 | 1..0 # Your perl interpreter is badly BROKEN. Child watchers will not work, ever. Try upgrading to a newer perl or a working perl (cygwin's perl is known to work). If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT WORK. |
14 | 1..0 # SKIP Your perl interpreter is badly BROKEN. Child watchers will not work, ever. Try upgrading to a newer perl or a working perl (cygwin's perl is known to work). If that is not an option, you should be able to use the remaining functionality of AnyEvent, but child watchers WILL NOT WORK. |
18 | EOF |
15 | EOF |
19 | exit 0; |
16 | exit 0; |
20 | } |
17 | } |
21 | } |
18 | } |
22 | } |
19 | } |
|
|
20 | |
|
|
21 | use AnyEvent; |
|
|
22 | BEGIN { eval q{use AnyEvent::Impl::POE;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::POE not loadable}), exit 0) } $^W = 0; |
23 | |
23 | |
24 | $| = 1; print "1..50\n"; |
24 | $| = 1; print "1..50\n"; |
25 | |
25 | |
26 | $AnyEvent::MAX_SIGNAL_LATENCY = 0.2; |
26 | $AnyEvent::MAX_SIGNAL_LATENCY = 0.2; |
27 | |
27 | |