--- AnyEvent/constants.pl.PL 2010/11/22 06:32:18 1.8 +++ 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"; @@ -32,13 +33,18 @@ i WIN32 => $WIN32; # add these purely to avoid loading Fcntl, which is slow and bloated. -use Fcntl (); i F_SETFD => eval { Fcntl::F_SETFD() } || 2; i F_SETFL => eval { Fcntl::F_SETFL() } || 4; 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...