--- AnyEvent/constants.pl.PL 2010/11/26 21:27:41 1.9 +++ AnyEvent/constants.pl.PL 2010/12/05 11:41:45 1.10 @@ -7,6 +7,7 @@ # when built as part of perl, these are not available BEGIN { eval "use Socket ()" } BEGIN { eval "use Fcntl ()" } +BEGIN { eval "use POSIX ()" } open my $fh, ">lib/AnyEvent/constants.pl" or die "lib/AnyEvent/constants.pl: $_[0]\n"; @@ -38,6 +39,12 @@ i O_NONBLOCK => eval { Fcntl::O_NONBLOCK() } || 04000; i FD_CLOEXEC => eval { Fcntl::FD_CLOEXEC() } || 1; +print "package AnyEvent::Base;\n"; + +# add these purely to avoid loading POSIX, which is slow and bloated. + +i WNOHANG => eval { POSIX::WNOHANG() } || 1; + print "package AnyEvent::Util;\n"; # broken windows perls use undocumented error codes...