1 | BEGIN { | ||
---|---|---|---|
2 | # check for broken perls | ||
3 | if ($^O =~ /mswin32/i) { | ||
4 | my $ok; | ||
5 | local $SIG{CHLD} = sub { $ok = 1 }; | ||
6 | kill 'CHLD', 0; | ||
7 | |||
8 | unless ($ok) { | ||
9 | print <<EOF; | ||
10 | 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. | ||
11 | EOF | ||
12 | exit 0; | ||
13 | } | ||
14 | } | ||
15 | } | ||
16 | |||
1 | use AnyEvent; | 17 | use AnyEvent; |
2 | use AnyEvent::Util; | 18 | use AnyEvent::Util; |
3 | BEGIN { require AnyEvent::Impl::Perl unless $ENV{PERL_ANYEVENT_MODEL} } | 19 | BEGIN { require AnyEvent::Impl::Perl unless $ENV{PERL_ANYEVENT_MODEL} } |
4 | 20 | ||
5 | $| = 1; print "1..14\n"; | 21 | $| = 1; print "1..14\n"; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |