--- AnyEvent/lib/AnyEvent.pm 2009/07/08 02:01:12 1.229 +++ AnyEvent/lib/AnyEvent.pm 2009/07/09 01:08:22 1.232 @@ -742,6 +742,73 @@ =back +=head1 SUPPORTED EVENT LOOPS/BACKENDS + +The available backend classes are (every class has its own manpage): + +=over 4 + +=item Backends that are autoprobed when no other event loop can be found. + +EV is the preferred backend when no other event loop seems to be in +use. If EV is not installed, then AnyEvent will try Event, and, failing +that, will fall back to its own pure-perl implementation, which is +available everywhere as it comes with AnyEvent itself. + + AnyEvent::Impl::EV based on EV (interface to libev, best choice). + AnyEvent::Impl::Event based on Event, very stable, few glitches. + AnyEvent::Impl::Perl pure-perl implementation, fast and portable. + +=item Backends that are transparently being picked up when they are used. + +These will be used when they are currently loaded when the first watcher +is created, in which case it is assumed that the application is using +them. This means that AnyEvent will automatically pick the right backend +when the main program loads an event module before anything starts to +create watchers. Nothing special needs to be done by the main program. + + AnyEvent::Impl::Glib based on Glib, slow but very stable. + AnyEvent::Impl::Tk based on Tk, very broken. + AnyEvent::Impl::EventLib based on Event::Lib, leaks memory and worse. + AnyEvent::Impl::POE based on POE, very slow, some limitations. + +=item Backends with special needs. + +Qt requires the Qt::Application to be instantiated first, but will +otherwise be picked up automatically. As long as the main program +instantiates the application before any AnyEvent watchers are created, +everything should just work. + + AnyEvent::Impl::Qt based on Qt. + +Support for IO::Async can only be partial, as it is too broken and +architecturally limited to even support the AnyEvent API. It also +is the only event loop that needs the loop to be set explicitly, so +it can only be used by a main program knowing about AnyEvent. See +L for the gory details. + + AnyEvent::Impl::IOAsync based on IO::Async, cannot be autoprobed. + +=item Event loops that are indirectly supported via other backends. + +Some event loops can be supported via other modules: + +There is no direct support for WxWidgets (L) or L. + +B has no support for watching file handles. However, you can +use WxWidgets through the POE adaptor, as POE has a Wx backend that simply +polls 20 times per second, which was considered to be too horrible to even +consider for AnyEvent. + +B is not supported as nobody seems to be using it, but it has a POE +backend, so it can be supported through POE. + +AnyEvent knows about both L and L, however, and will try to +load L when detecting them, in the hope that POE will pick them up, +in which case everything will be automatic. + +=back + =head1 GLOBAL VARIABLES AND FUNCTIONS =over 4 @@ -754,31 +821,6 @@ C modules, but can be any other class in the case AnyEvent has been extended at runtime (e.g. in I). -The known classes so far are: - - AnyEvent::Impl::EV based on EV (an interface to libev, best choice). - AnyEvent::Impl::Event based on Event, second best choice. - AnyEvent::Impl::Perl pure-perl implementation, fast and portable. - AnyEvent::Impl::Glib based on Glib, third-best choice. - AnyEvent::Impl::Tk based on Tk, very bad choice. - AnyEvent::Impl::Qt based on Qt, cannot be autoprobed (see its docs). - AnyEvent::Impl::EventLib based on Event::Lib, leaks memory and worse. - AnyEvent::Impl::POE based on POE, not generic enough for full support. - - # warning, support for IO::Async is only partial, as it is too broken - # and limited toe ven support the AnyEvent API. See AnyEvent::Impl::Async. - AnyEvent::Impl::IOAsync based on IO::Async, cannot be autoprobed (see its docs). - -There is no support for WxWidgets, as WxWidgets has no support for -watching file handles. However, you can use WxWidgets through the -POE Adaptor, as POE has a Wx backend that simply polls 20 times per -second, which was considered to be too horrible to even consider for -AnyEvent. Likewise, other POE backends can be used by AnyEvent by using -it's adaptor. - -AnyEvent knows about L and L and will try to use L when -autodetecting them. - =item AnyEvent::detect Returns C<$AnyEvent::MODEL>, forcing autodetection of the event model @@ -870,9 +912,9 @@ =head1 OTHER MODULES The following is a non-exhaustive list of additional modules that use -AnyEvent and can therefore be mixed easily with other AnyEvent modules -in the same program. Some of the modules come with AnyEvent, some are -available via CPAN. +AnyEvent as a client and can therefore be mixed easily with other AnyEvent +modules and other event loops in the same program. Some of the modules +come with AnyEvent, most are available via CPAN. =over 4 @@ -891,7 +933,7 @@ Provide read and write buffers, manages watchers for reads and writes, supports raw and formatted I/O, I/O queued and fully transparent and -non-blocking SSL/TLS. +non-blocking SSL/TLS (via L. =item L @@ -929,18 +971,19 @@ A non-blocking interface to gpsd, a daemon delivering GPS information. -=item L - -A non-blocking interface to the Internet Go Server protocol (used by -L). - =item L AnyEvent based IRC client module family (replacing the older Net::IRC3). -=item L +=item L -AnyEvent based XMPP (Jabber protocol) module family. +AnyEvent based XMPP (Jabber protocol) module family (replacing the older +Net::XMPP2>. + +=item L + +A non-blocking interface to the Internet Go Server protocol (used by +L). =item L @@ -955,10 +998,6 @@ Has special support for AnyEvent via L. -=item L - -The lambda approach to I/O - don't ask, look there. Can use AnyEvent. - =back =cut @@ -970,7 +1009,7 @@ use Carp; -our $VERSION = 4.8; +our $VERSION = 4.801; our $MODEL; our $AUTOLOAD; @@ -1006,14 +1045,14 @@ # everything below here will not be autoprobed # as the pureperl backend should work everywhere # and is usually faster - [Tk:: => AnyEvent::Impl::Tk::], # crashes with many handles [Glib:: => AnyEvent::Impl::Glib::], # becomes extremely slow with many watchers [Event::Lib:: => AnyEvent::Impl::EventLib::], # too buggy - [Qt:: => AnyEvent::Impl::Qt::], # requires special main program + [Tk:: => AnyEvent::Impl::Tk::], # crashes with many handles [POE::Kernel:: => AnyEvent::Impl::POE::], # lasciate ogni speranza + [Qt:: => AnyEvent::Impl::Qt::], # requires special main program [Wx:: => AnyEvent::Impl::POE::], [Prima:: => AnyEvent::Impl::POE::], - # IO::Async is just too broken - we would need workaorunds for its + # IO::Async is just too broken - we would need workarounds for its # byzantine signal and broken child handling, among others. # IO::Async is rather hard to detect, as it doesn't have any # obvious default class. @@ -2121,16 +2160,18 @@ Implementations: L, L, L, L, L, L, L, -L. +L, L. Non-blocking file handles, sockets, TCP clients and -servers: L, L. +servers: L, L, L. Asynchronous DNS: L. -Coroutine support: L, L, L, L, +Coroutine support: L, L, L, +L, -Nontrivial usage examples: L, L, L. +Nontrivial usage examples: L, L, +L. =head1 AUTHOR