Revision history for IO-Async 0.27 CHANGES: * Implement 'autoflush' option on IO::Async::Stream BUGFIXES: * Avoid $_ breaking stored signal handler references when invoking them * Ignore EINTR from sysread/syswrite * More reliable socket address tests - don't rely on uninitialised padding bytes between struct members 0.26 BUGFIXES: * Connect to INADDR_LOOPBACK rather than INADDR_ANY during t/24listener.t; hopefully fixes FAILs on OpenBSD * Fix IO::Async::Stream during combined read/write-ready of a closed stream 0.25 CHANGES: * Accept 'stream'/'dgram'/'raw' as symbolic shortcuts for socket types in connect/listen operations - avoids 'use Socket' * Accept IO::Handle-derived objects in ChildManager setup keys as well as raw GLOB refs BUGFIXES: * Various changes to test scripts to hopefully improve portability or reliability during smoke tests 0.24 ADDITIONS: * Timer subclasses - Countdown and Periodic * Idleness event watching via low-level 'watch_io/unwatch_io' methods and higher-level 'later' method * Added the missing 'unwatch_child' method * Shareable acceptance testing suite for IO::Async::Loop subclasses for better testing in subclass implementations CHANGES: * More future-proof API version checking for subclasses - requires subclasses to declare their version. ### pre-0.24 Loop subclasses are no longer compatible. ### * Entirely remove the need to $loop->enable_childmanager by calling waitpid() in 'watch_child'. 0.23 CHANGES: * Rearranged IO::Async::Listener to be a constructable Notifier suclass * Allow Signal, Timer and Listener to act as base classes as well as standalone with callbacks * Renamed IO::Async::Loop::IO_Poll to ::Poll; created transparent backward-compatibility wrapper 0.22 CHANGES: * Added tcp-proxy.pl example * More documentation on IO::Async::Notifier subclass-override methods * Documented that IO::Async::MergePoint is just an Async::MergePoint * Various small updates to keep CPANTS happy BUGFIXES: * Don't test Async::MergePoint locally as it's now a separate dist, and the tests here were reporting false negatives. 0.21 CHANGES: * Added "use warnings" to all modules * Created Notifier->configure method to allow changing properties of a Notifier or subclass after construction * New 'examples' dir with some small example scripts BUGFIXES: * More robust timing tests to avoid some spurious test failures due to busy testing servers or other non-issues 0.20 CHANGES: * Major reworking of underlying Loop implementation: + Unified low-level IO, timer and signal watches as callbacks + Split IO handle parts of Notifier into new IO::Async::Handle class + Created Timer and Signal subclasses of Notifier These changes will require a compatible upgrade to the underlying Loop implementation. * Hide SignalProxy and TimeQueue from CPAN's indexer, as they are internal-only details that don't need exposing there. * Loop magic constructor now warns if a specifically-requested class is not available * Allow multiple attachment of signals via Loop->attach_signal or new Signal objects 0.19 CHANGES: * Allow control of Sequencer's pipelining * Documentation fixes * Allow Loop->run_child to take a 'setup' array * Added 'setuid', 'setgid' and 'setgroups' child setup operations * Support 'on_notifier' in Loop->listen BUGFIXES: * carp before return in Stream->write so it actually prints * Ensure Streams still work after being closed and reopened by ->set_handle * If IO::Socket->new() fails, try again with generic ->socket (makes IPv6 work on platforms without IO::Socket::INET6) 0.18 CHANGES: * Allow Sequencer to be a base class as well as using constructor callbacks * Use signal names from Config.pm rather than relying on POSIX.pm. Covers more signals that way BUGFIXES: * Gracefully handle accept() returning EAGAIN * Fixed handling of IO::Socket->getsockopt( SOL_SOCKET, SO_ERROR ) 0.17 CHANGES: * Added Stream->close_when_empty and ->close_now. Added docs * Added OS abstractions of socketpair() and pipe() * Many documentation changes and updates BUGFIXES: * Properly handle stream read/write errors; close immediately rather than deferring until empty. * Various CPAN testers somketest bug fixes * Fixed http://rt.cpan.org/Ticket/Display.html?id=38476 0.16 ADDITIONS: * Loop->requeue_timer() * Magic constructor in IO::Async::Loop which tries to find the best subclass * 'chdir' and 'nice' ChildManager operations CHANGES: * Make sure that top-level objects are refcount-clean by using Test::Refcount, and Scalar::Util::weaken() BUGFIXES: * Keep perl 5.6.1 happy by not passing LocalPort => 0 when constructing IO::Socket::INETs * Pass the Type option to IO::Socket::INET constructor in test scripts 0.15 REMOVALS: * IO::Async::Set subclasses and IO::Async::Buffer have now been entirely removed. CHANGES: * Support handle-less IO::Async::Sequencer, like ::Notifier * Set SO_REUSEADDR on listening sockets by default * Allow Loop->listen() on a plain filehandle containing a socket * No longer any need to explcitly call Loop->enable_childmanager BUGFIXES: * IO::Async::Loop->_adjust_timeout actually works properly * Notifier->close() only runs on_closed callback if it actually closed - allows for neater cross-connected Notifiers * Made Notifier->want_{read,write}ready more efficient * Notifier->close() on a child notifier works * Loop->listen() should take the first successful address, rather than trying them all 0.14 REMOVALS: * IO::Async::Set subclasses and IO::Async::Buffer are now completely deprecated. Any attempt to use them will fail immediately. ADDITIONS: * 'keep' ChildManager operation * IO::Async::Test::wait_for_stream() * Loop->listen() * IO::Async::Sequencer class CHANGES: * Support dynamic swapping of temporary 'on_read' handlers in Stream * Now requires Socket::GetAddrInfo >= 0.08 * Further shortcuts in ChildManager setup keys - IO references and simple string operation names * Support handle-less IO::Async::Notifiers that have IO handles added to them later * Allow 'setup' key to Loop->detach_code() * Various documentation updates BUGFIXES: * Allow the same filehandle to be 'dup'ed more than once in ChildManager 0.13 CHANGES: * Flush all awaiting data from Stream when it becomes writeready * Supply a real IO::Async::Test module to allow testing in 3rd party distros * Various documentation fixes BUGFIXES: * Don't rely on STDOUT being writable during test scripts 0.12 CHANGES: * Allow Notifiers that are write-only. * Added ChildManager->open and ->run; with ->open_child and ->run_child on the containing Loop. * Moved IO::Async::Loop::Glib out to its own CPAN dist, to simplify Build.PL and testing scripts BUGFIXES: * Make sure to "use IO::Socket" in IO::Async::Connector * Pass 'socktype' argument to ->connect during testing 0.11 INCOMPATIBLE CHANGES: * Renamed IO::Async::Set::* to IO::Async::Loop::* - provided backward-compatibility wrappers around old names. IO::Async::Set::GMainLoop has become IO::Async::Lib::Glib * Renamed IO::Async::Buffer to IO::Async::Stream - provided backward- compatibility wrapper around old name. * Loop->get_childmanager() and ->get_sigproxy() no longer allowed CHANGES: * Extended ->loop_once() and ->loop() feature out to all IO::Async::Loop classes * Added IO::Async::Resolver and IO::Async::Connector, plus Loop integration * Allow write-only IO::Async::Notifiers that have no read handle or readiness callback. 0.10 INCOMPATIBLE CHANGES: * Renamed events and methods in IO::Async::Notifier to better fit the naming scheme of normal Perl handles. Backward-compatibility hooks are currently provided, but will be removed in a later release. Any code using the old names should be updated CHANGES: * Allow DetachedCode to have multiple back-end worker processes. * Control if a back-end worker exits when the code "die"s * Added 'close()' method on Notifiers/Buffers. Sensible behaviour on buffers with queued data to send * Reset %SIG hash in ChildManager->detach_child() BUGFIXES: * Clean up temporary directory during testing * Shut down DetachedCode workers properly on object deref * Better handling of borderline timing failures in t/11set-*.t * Close old handles before dup2()ing new ones when detaching code * Various other minor test script improvements 0.09 CHANGES: * Added TimeQueue object and integration with IO::Async::Set and subclasses. * Added MergePoint object * Added 'on_closed' callback support to IO::Async::Notifier BUGFIXES: * Don't depend on system locale when checking string value of $! * Fixed test scripts to more closely approximate real code behaviour in the presence of poll() vs. deferred signal delivery 0.08 CHANGES: * Added ChildManager->detach_child() method * Added DetachedCode object BUGFIXES: * Better tests for presence of Glib to improve test false failures * More lenient times in test script 11set-IO-Poll-timing to allow for variances at test time * Avoid bugs in post_select()/post_poll() caused by some notifier callbacks removing other notifiers from the set 0.07 BUGFIXES: * Avoid race condition in t/30childmanager.t - wait for child process to actually exit * Avoid race condition in IO::Async::ChildManager->spawn() by waiting for SIGCHLD+pipe close, rather than SIGCHLD+pipe data 0.06 CHANGES: * Allow 'env' setup key to ChildManager->spawn() to change the child's %ENV * Updated the way some of the ->spawn() tests are conducted. There seems to be massive failures reported on cpantesters against 0.05. These changes won't fix the bugs, but should assist in reporting and tracking them down. BUGFIXES: * Don't rely on existence of /bin/true - test for /usr/bin/true as well, fall back on "$^X -e 1" * Avoid kernel race condition in t/32childmanager-spawn-setup.t by proper use of select() when testing. 0.05 CHANGES: * Added ChildManager object * Added singleton storage in IO::Async::Set to store a SignalProxy or ChildManager conveniently BUGFIXES: * Workaround for a bug in IO::Poll version 0.05 0.04 CHANGES: * Added dynamic signal attach / detach methods to SignalProxy * Buffer now has on_read_error / on_write_error callbacks for handling IO errors on underlying sysread()/syswrite() calls 0.03 CHANGES: * No longer build_requires 'Glib' - print a warning if it's not installed but carry on anyway. * IO_Poll->loop_once() now returns the result from the poll() call * Added concept of nested child notifiers within Notifier object BUGFIXES: * Fix to test scripts that call IO_Poll's loop_once() with a timeout of zero. This can cause a kernel race condition, so supply some small non-zero value instead. 0.02 INCOMPATIBLE CHANGES: * Event methods/callback functions now called "on_*" to distinguish them * Callback functions now pass $self as first argument to simplify called code CHANGES: * Improved POD in Notifier.pm and Buffer.pm BUGFIXES: * GMainLoop.pm - return 1 from callbacks so that glib doesn't remove our IO sources * GMainLoop.pm - make sure re-asserting want_writeready actually adds the IO source again 0.01 First version, released on an unsuspecting world.