On Tue, Sep 16, 2003 at 01:31:48AM +0200, Marc A. Lehmann wrote: > [I am not on the list, please consider sending me a cc]
Cc sent. > While developing Net-FCP, I implemented a very primitive wrapper around > the Event, Coro::Event, Glib and Tk event models - it basically offers a > somewhat limited Event-like API on top of whatever event library is loaded > (or can be autodetected). > > I haven't seen something similar on CPAN yet (but I am blind), and since > the problem (using Event-driven I/O in modules) is definitely real (at > least for me), having a library that offers me simple readable/writable > events, signals (not unix-signals but general "wait for something async to > happen") that work under Gtk2 _and_ Tk _and_ Event etc. seems useful. Have you seen POE? It includes bridges to its own select() and IO::Poll event loops, Event, Gtk, Tk, and Tk with I/O polling for ActivePerl. Other bridges are welcome. Gtk2 support has just been written (but not yet released), and people occasionally threaten to write ones for Qt and wxPerl. The POE::Loop man page discusses POE's event loop bridge. It covers socket and pipe I/O, signals, and time. It includes examples from existing bridges to help you get going. All of POE's public interfaces and features are built atop this laper. See: http://search.cpan.org/author/RCAPUTO/POE-0.26/POE/Loop.pm POE is migrating towards a pluggable design. POE's medium- and high-level event features (aliases, reference counts, user events, etc.) are moving to POE::Resource clasess. The plug-in system will allow additional features, such as semaphores (for shared-memory events) and file locking events. POE's public interfaces will move to POE::API classes. It will be possible to plug in replacement syntax and semantics, or to extend POE with entirely new interfaces. The proof of concept is POE::API::Peek, deep introspection into POE's private data for developers and test writers. POE::Session subclasses provide ways to alter POE's callback semantics. The CPAN has a couple examples already: http://search.cpan.org/author/RCAPUTO/POE-Session-MessageBased-0.01/MessageBased.pm http://search.cpan.org/author/CWEST/POE-Session-MultiDispatch-1.3/MultiDispatch.pm You can tell I'm very excited about all this. :) -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/