--- cvsroot/EV/Makefile.PL 2007/11/17 01:41:33 1.22 +++ cvsroot/EV/Makefile.PL 2008/10/29 17:41:11 1.36 @@ -40,7 +40,8 @@ reliably. Unfortunately, some systems are bound to be broken, so you can disable this here: you can completely disable the detection and use of the monotonic clock by answering 'n' here. Support for this clock type -will otherwise be autodetected at both compile- and runtime. +will otherwise be autodetected at both compile- and runtime. (this setting +currently affects the use of nanosleep over select as well). EOF @@ -118,13 +119,13 @@ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** -EV by default uses select, which makes it hard to write efficient servers, -especially if the number of active connections is much lower than the open -ones. GNU/Linux systems have a more scalable method called "epoll", which -EV can use. For this to work, both your kernel and glibc have to support -epoll, but if you can compile it, the detection will be done at runtime, -and EV will safely fall back to using select when epoll isn't available. -If unsure, accept the default. +Select and poll make it hard to write efficient servers, especially if the +number of active connections is much lower than the watched ones. GNU/Linux +systems have a more scalable method called "epoll", which EV can use. For +this to work, both your kernel and glibc have to support epoll, but if you +can compile it, the detection will be done at runtime, and EV will safely +fall back to using select when epoll isn't available. If unsure, accept +the default. EOF @@ -135,16 +136,28 @@ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** -Similarly to the epoll backend above, EV can take advantage of kqueue -on many BSD systems (it seems to be broken on Mac OS X though, but what -isn't broken on that shoddy platform... ah yes, the cash gushing by apple, -selling defective software works perfectly there). Support for kqueue will -be detected at runtime, with a safe fallback to other methods when it -cannot be used. +Similarly to the epoll backend above, EV can take advantage of kqueue on +many BSD systems. Support for kqueue will be detected at runtime, with a +safe fallback to other methods when it cannot be used. + +Note that kqueue is broken on most operating systems, so by default it +won't be used on many platforms, but you can still create your own event +loop with qkueue backend. + +Here is what we know: + +NetBSD: partially working in at least 3.1. Yeah! :) +FreeBSD: broken on at least 6.2-STABLE, + sockets *likely* work, ptys definitely don't. +OpenBSD: reports indicate that it likely doesn't work + (similar problems as on FreeBSD). +OS X: completely, utterly broken on at least < 10.5. EOF -$DEFINE .= " -DEV_USE_KQUEUE=" . (0 + (prompt ("Enable kqueue backend (y/n)?", (-e "/usr/include/sys/event.h") ? "y" : "n") =~ /[yY]/)); +my $can_kqueue = -e "/usr/include/sys/event.h"; + +$DEFINE .= " -DEV_USE_KQUEUE=" . (0 + (prompt ("Enable kqueue backend (y/n)?", $can_kqueue ? "y" : "n") =~ /[yY]/)); print < { "EV.c" => "EV/EVAPI.h " . "libev/ev.c libev/ev.h libev/ev_epoll.c libev/ev_select.c libev/ev_kqueue.c libev/ev_poll.c " - . "libev/event.h libev/event.c evdns.h evdns.c libev/ev_vars.h libev/ev_wrap.h", + . "libev/ev_vars.h libev/ev_wrap.h", }, INC => "-Ilibev", DEFINE => "$DEFINE", @@ -204,11 +249,16 @@ VERSION_FROM => "EV.pm", PM => { 'EV.pm' => '$(INST_LIBDIR)/EV.pm', - 'EV/DNS.pm' => '$(INST_LIBDIR)/EV/DNS.pm', 'EV/EVAPI.h' => '$(INST_LIBDIR)/EV/EVAPI.h', 'EV/MakeMaker.pm' => '$(INST_LIBDIR)/EV/MakeMaker.pm', 'libev/ev.h' => '$(INST_LIBDIR)/EV/ev.h', + 'libev/ev.pod' => '$(INST_LIBDIR)/EV/libev.pod', }, + MAN3PODS => { + 'EV.pm' => '$(INST_MAN3DIR)/EV.$(MAN3EXT)', + 'EV/MakeMaker.pm' => '$(INST_MAN3DIR)/EV::MakeMaker.$(MAN3EXT)', + 'libev/ev.pod' => '$(INST_MAN3DIR)/EV::libev.$(MAN3EXT)', + }, );