r54105 - in /branches/upstream/libio-async-perl/current: ./ lib/IO/ lib/IO/Async/ lib/IO/Async/Loop/ lib/IO/Async/Timer/ t/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Thu Mar 11 16:43:00 UTC 2010


Author: jawnsy-guest
Date: Thu Mar 11 16:42:51 2010
New Revision: 54105

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=54105
Log:
[svn-upgrade] Integrating new upstream version, libio-async-perl (0.28)

Modified:
    branches/upstream/libio-async-perl/current/Changes
    branches/upstream/libio-async-perl/current/LICENSE
    branches/upstream/libio-async-perl/current/META.yml
    branches/upstream/libio-async-perl/current/Makefile.PL
    branches/upstream/libio-async-perl/current/README
    branches/upstream/libio-async-perl/current/lib/IO/Async.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/ChildManager.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/Connector.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/DetachedCode.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/Handle.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/Listener.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/Loop.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/Loop/IO_Poll.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/Loop/Poll.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/Loop/Select.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/LoopTests.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/MergePoint.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/Notifier.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/Resolver.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/Sequencer.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/Signal.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/Stream.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/Test.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/Timer.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/Timer/Countdown.pm
    branches/upstream/libio-async-perl/current/lib/IO/Async/Timer/Periodic.pm
    branches/upstream/libio-async-perl/current/t/22timer-countdown.t

Modified: branches/upstream/libio-async-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/Changes?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/Changes (original)
+++ branches/upstream/libio-async-perl/current/Changes Thu Mar 11 16:42:51 2010
@@ -1,4 +1,11 @@
 Revision history for IO-Async
+
+0.28    BUGFIXES:
+         * Ensure that Timer->start returns $self even when not in a Loop
+         * Accept bare GLOB refs as IO::Async::Listener handles; upgrade them
+           to IO::Socket refs if required
+         * Applied documentation patch from RT 55375 - thanks to
+           Chris Williams
 
 0.27    CHANGES:
          * Implement 'autoflush' option on IO::Async::Stream

Modified: branches/upstream/libio-async-perl/current/LICENSE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/LICENSE?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/LICENSE (original)
+++ branches/upstream/libio-async-perl/current/LICENSE Thu Mar 11 16:42:51 2010
@@ -1,4 +1,4 @@
-This software is copyright (c) 2009 by Paul Evans <leonerd at leonerd.org.uk>.
+This software is copyright (c) 2010 by Paul Evans <leonerd at leonerd.org.uk>.
 
 This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@
 
 --- The GNU General Public License, Version 1, February 1989 ---
 
-This software is Copyright (c) 2009 by Paul Evans <leonerd at leonerd.org.uk>.
+This software is Copyright (c) 2010 by Paul Evans <leonerd at leonerd.org.uk>.
 
 This is free software, licensed under:
 
@@ -270,7 +270,7 @@
 
 --- The Artistic License 1.0 ---
 
-This software is Copyright (c) 2009 by Paul Evans <leonerd at leonerd.org.uk>.
+This software is Copyright (c) 2010 by Paul Evans <leonerd at leonerd.org.uk>.
 
 This is free software, licensed under:
 

Modified: branches/upstream/libio-async-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/META.yml?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/META.yml (original)
+++ branches/upstream/libio-async-perl/current/META.yml Thu Mar 11 16:42:51 2010
@@ -1,17 +1,84 @@
 ---
-name: IO-Async
-version: 0.27
+abstract: 'perform asynchronous filehandle IO and other operations'
 author:
   - 'Paul Evans <leonerd at leonerd.org.uk>'
-abstract: perform asynchronous filehandle IO and other operations
-license: perl
-resources:
-  license: http://dev.perl.org/licenses/
 build_requires:
   File::Temp: 0
   Test::Exception: 0
   Test::More: 0
   Test::Refcount: 0
+configure_requires:
+  Module::Build: 0.36
+generated_by: 'Module::Build version 0.3603'
+license: perl
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
+name: IO-Async
+provides:
+  IO::Async:
+    file: lib/IO/Async.pm
+    version: 0.28
+  IO::Async::ChildManager:
+    file: lib/IO/Async/ChildManager.pm
+    version: 0.28
+  IO::Async::Connector:
+    file: lib/IO/Async/Connector.pm
+    version: 0.28
+  IO::Async::DetachedCode:
+    file: lib/IO/Async/DetachedCode.pm
+    version: 0.28
+  IO::Async::Handle:
+    file: lib/IO/Async/Handle.pm
+    version: 0.28
+  IO::Async::Listener:
+    file: lib/IO/Async/Listener.pm
+    version: 0.28
+  IO::Async::Loop:
+    file: lib/IO/Async/Loop.pm
+    version: 0.28
+  IO::Async::Loop::IO_Poll:
+    file: lib/IO/Async/Loop/IO_Poll.pm
+    version: 0.28
+  IO::Async::Loop::Poll:
+    file: lib/IO/Async/Loop/Poll.pm
+    version: 0.28
+  IO::Async::Loop::Select:
+    file: lib/IO/Async/Loop/Select.pm
+    version: 0.28
+  IO::Async::LoopTests:
+    file: lib/IO/Async/LoopTests.pm
+    version: 0.28
+  IO::Async::MergePoint:
+    file: lib/IO/Async/MergePoint.pm
+    version: 0.28
+  IO::Async::Notifier:
+    file: lib/IO/Async/Notifier.pm
+    version: 0.28
+  IO::Async::Resolver:
+    file: lib/IO/Async/Resolver.pm
+    version: 0.28
+  IO::Async::Sequencer:
+    file: lib/IO/Async/Sequencer.pm
+    version: 0.28
+  IO::Async::Signal:
+    file: lib/IO/Async/Signal.pm
+    version: 0.28
+  IO::Async::Stream:
+    file: lib/IO/Async/Stream.pm
+    version: 0.28
+  IO::Async::Test:
+    file: lib/IO/Async/Test.pm
+    version: 0.28
+  IO::Async::Timer:
+    file: lib/IO/Async/Timer.pm
+    version: 0.28
+  IO::Async::Timer::Countdown:
+    file: lib/IO/Async/Timer/Countdown.pm
+    version: 0.28
+  IO::Async::Timer::Periodic:
+    file: lib/IO/Async/Timer/Periodic.pm
+    version: 0.28
 requires:
   Async::MergePoint: 0
   Heap: 0.8
@@ -19,73 +86,6 @@
   Socket::GetAddrInfo: 0.08
   Storable: 0
   Time::HiRes: 0
-configure_requires:
-  Module::Build: 0.35
-provides:
-  IO::Async:
-    file: lib/IO/Async.pm
-    version: 0.27
-  IO::Async::ChildManager:
-    file: lib/IO/Async/ChildManager.pm
-    version: 0.27
-  IO::Async::Connector:
-    file: lib/IO/Async/Connector.pm
-    version: 0.27
-  IO::Async::DetachedCode:
-    file: lib/IO/Async/DetachedCode.pm
-    version: 0.27
-  IO::Async::Handle:
-    file: lib/IO/Async/Handle.pm
-    version: 0.27
-  IO::Async::Listener:
-    file: lib/IO/Async/Listener.pm
-    version: 0.27
-  IO::Async::Loop:
-    file: lib/IO/Async/Loop.pm
-    version: 0.27
-  IO::Async::Loop::IO_Poll:
-    file: lib/IO/Async/Loop/IO_Poll.pm
-    version: 0.27
-  IO::Async::Loop::Poll:
-    file: lib/IO/Async/Loop/Poll.pm
-    version: 0.27
-  IO::Async::Loop::Select:
-    file: lib/IO/Async/Loop/Select.pm
-    version: 0.27
-  IO::Async::LoopTests:
-    file: lib/IO/Async/LoopTests.pm
-    version: 0.27
-  IO::Async::MergePoint:
-    file: lib/IO/Async/MergePoint.pm
-    version: 0.27
-  IO::Async::Notifier:
-    file: lib/IO/Async/Notifier.pm
-    version: 0.27
-  IO::Async::Resolver:
-    file: lib/IO/Async/Resolver.pm
-    version: 0.27
-  IO::Async::Sequencer:
-    file: lib/IO/Async/Sequencer.pm
-    version: 0.27
-  IO::Async::Signal:
-    file: lib/IO/Async/Signal.pm
-    version: 0.27
-  IO::Async::Stream:
-    file: lib/IO/Async/Stream.pm
-    version: 0.27
-  IO::Async::Test:
-    file: lib/IO/Async/Test.pm
-    version: 0.27
-  IO::Async::Timer:
-    file: lib/IO/Async/Timer.pm
-    version: 0.27
-  IO::Async::Timer::Countdown:
-    file: lib/IO/Async/Timer/Countdown.pm
-    version: 0.27
-  IO::Async::Timer::Periodic:
-    file: lib/IO/Async/Timer/Periodic.pm
-    version: 0.27
-generated_by: Module::Build version 0.35
-meta-spec:
-  url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
+resources:
+  license: http://dev.perl.org/licenses/
+version: 0.28

Modified: branches/upstream/libio-async-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/Makefile.PL?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/Makefile.PL (original)
+++ branches/upstream/libio-async-perl/current/Makefile.PL Thu Mar 11 16:42:51 2010
@@ -1,4 +1,4 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.35
+# Note: this file was auto-generated by Module::Build::Compat version 0.3603
 use ExtUtils::MakeMaker;
 WriteMakefile
 (

Modified: branches/upstream/libio-async-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/README?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/README (original)
+++ branches/upstream/libio-async-perl/current/README Thu Mar 11 16:42:51 2010
@@ -42,11 +42,11 @@
 DESCRIPTION
     This collection of modules allows programs to be written that perform
     asynchronous filehandle IO operations. A typical program using them
-    would consist of a single subclass of "IO::Async::Loop" to act as a
-    container o other objects, which perform the actual IO work required by
-    the program. As as IO handles, the loop also supports timers and signal
-    handlers, and includes more higher-level functionallity built on top of
-    these basic parts.
+    would consist of a single subclass of IO::Async::Loop to act as a
+    container of other objects, which perform the actual IO work required by
+    the program. As well as IO handles, the loop also supports timers and
+    signal handlers, and includes more higher-level functionallity built on
+    top of these basic parts.
 
     Because there are a lot of classes in this collection, the following
     overview gives a brief description of each.
@@ -61,14 +61,14 @@
     The following sections describe particular types of Notifier.
 
   File Handle IO
-    A IO::Async::Handle object is a Notifier that represents a single IO
+    An IO::Async::Handle object is a Notifier that represents a single IO
     handle being managed. While in most cases it will represent a single
-    filehandle, such as a socket (for example, an "IO::Socket::INET"
+    filehandle, such as a socket (for example, an IO::Socket::INET
     connection), it is possible to have separate reading and writing handles
     (most likely for a program's "STDIN" and "STDOUT" streams, or a pair of
     pipes connected to a child process).
 
-    The IO::Async::Stream class is a subclass of "IO::Async::Handle" which
+    The IO::Async::Stream class is a subclass of IO::Async::Handle which
     maintains internal incoming and outgoing data buffers. In this way, it
     implements bidirectional buffering of a byte stream, such as a TCP
     socket. The class automatically handles reading of incoming data into
@@ -76,17 +76,17 @@
     callbacks are used to inform when new incoming data is available, or
     when the outgoing buffer is empty.
 
-    The IO::Async::Listener class is another subclass of "IO::Async::Handle"
+    The IO::Async::Listener class is another subclass of IO::Async::Handle
     which facilitates the use of "listen()"-mode sockets. When a new
     connection is available on the socket it will "accept()" it and pass the
     new client socket to its callback function.
 
   Timers
-    A IO::Async::Timer::Countdown object represents a counttime timer, which
-    will invoke a callback after a given delay. It can be stopped and
+    An IO::Async::Timer::Countdown object represents a count time timer,
+    which will invoke a callback after a given delay. It can be stopped and
     restarted.
 
-    A IO::Async::Timer::Periodic object invokes a callback at regular
+    An IO::Async::Timer::Periodic object invokes a callback at regular
     intervals from its initial start time. It is reliable and will not drift
     due to the time taken to run the callback.
 
@@ -95,7 +95,7 @@
     they are installed.
 
   Signals
-    A IO::Async::Signal object represents a POSIX signal, which will invoke
+    An IO::Async::Signal object represents a POSIX signal, which will invoke
     a callback when the given signal is received by the process. Multiple
     objects watching the same signal can be used; they will all invoke in no
     particular order.
@@ -109,12 +109,12 @@
 
   Loops
     The IO::Async::Loop object class represents an abstract collection of
-    "IO::Async::Notifier" objects, and manages the actual filehandle IO
-    watches, timers, signal handlers, and other functionallity. It performs
+    IO::Async::Notifier objects, and manages the actual filehandle IO
+    watchers, timers, signal handlers, and other functionallity. It performs
     all of the abstract collection management tasks, and leaves the actual
     OS interactions to a particular subclass for the purpose.
 
-    IO::Async::Loop::Poll uses an "IO::Poll" object for this test.
+    IO::Async::Loop::Poll uses an IO::Poll object for this test.
 
     IO::Async::Loop::Select uses the "select()" syscall.
 
@@ -123,12 +123,12 @@
     of a Glib-based program, or IO::Async::Loop::Ppoll which uses the
     IO::Ppoll object to handle signals safely on Linux.
 
-    As well as these general-purpose classes, the "IO::Async::Loop"
+    As well as these general-purpose classes, the IO::Async::Loop
     constructor also supports looking for OS-specific subclasses, in case a
     more efficient implementation exists for the specific OS it runs on.
 
   Child Processes
-    The "IO::Async::Loop" object provides a number of methods to facilitate
+    The IO::Async::Loop object provides a number of methods to facilitate
     the running of child processes. "spawn_child" is primarily a wrapper
     around the typical "fork()"/"exec()" style of starting child processes,
     "open_child" builds on this to provide management of child process file
@@ -154,7 +154,7 @@
     only by function call arguments and return values.
 
   Networking
-    The "IO::Async::Loop" provides several methods for performing
+    The IO::Async::Loop provides several methods for performing
     network-based tasks. Primarily, the "connect" and "listen" methods allow
     the creation of client or server network sockets. Additionally, the
     "resolve" method allows the use of the system's name resolvers in an
@@ -165,7 +165,7 @@
     result, some of the potentially-useful parts or features currently
     missing are:
 
-    *   A "IO::Async::Loop" subclass to perform integration with Event.
+    *   An IO::Async::Loop subclass to perform integration with Event.
         Consider further ideas on Solaris' *ports*, BSD's *Kevents* and
         anything that might be useful on Win32.
 
@@ -174,8 +174,8 @@
         extensively-different "ChildManager", or OSes may have specific ways
         to perform asynchronous name resolution operations better than the
         generic "DetachedCode" approach. This should be easier to implement
-        now that the "IO::Async::Loop" magic constructor looks for
-        OS-specific subclasses first.
+        now that the IO::Async::Loop magic constructor looks for OS-specific
+        subclasses first.
 
     *   A consideration of whether it is useful and possible to provide
         integration with POE or AnyEvent.

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async.pm Thu Mar 11 16:42:51 2010
@@ -12,7 +12,7 @@
 # It is provided simply to keep CPAN happy:
 #   cpan -i IO::Async
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 =head1 NAME
 
@@ -61,9 +61,9 @@
 
 This collection of modules allows programs to be written that perform
 asynchronous filehandle IO operations. A typical program using them would
-consist of a single subclass of C<IO::Async::Loop> to act as a container o
+consist of a single subclass of L<IO::Async::Loop> to act as a container of
 other objects, which perform the actual IO work required by the program. As
-as IO handles, the loop also supports timers and signal handlers, and
+well as IO handles, the loop also supports timers and signal handlers, and
 includes more higher-level functionallity built on top of these basic parts.
 
 Because there are a lot of classes in this collection, the following overview
@@ -80,31 +80,31 @@
 
 =head2 File Handle IO
 
-A L<IO::Async::Handle> object is a Notifier that represents a single IO handle
+An L<IO::Async::Handle> object is a Notifier that represents a single IO handle
 being managed. While in most cases it will represent a single filehandle, such
-as a socket (for example, an C<IO::Socket::INET> connection), it is possible
+as a socket (for example, an L<IO::Socket::INET> connection), it is possible
 to have separate reading and writing handles (most likely for a program's
 C<STDIN> and C<STDOUT> streams, or a pair of pipes connected to a child
 process).
 
-The L<IO::Async::Stream> class is a subclass of C<IO::Async::Handle> which
+The L<IO::Async::Stream> class is a subclass of L<IO::Async::Handle> which
 maintains internal incoming and outgoing data buffers. In this way, it
 implements bidirectional buffering of a byte stream, such as a TCP socket. The
 class automatically handles reading of incoming data into the incoming buffer,
 and writing of the outgoing buffer. Methods or callbacks are used to inform
 when new incoming data is available, or when the outgoing buffer is empty.
 
-The L<IO::Async::Listener> class is another subclass of C<IO::Async::Handle>
+The L<IO::Async::Listener> class is another subclass of L<IO::Async::Handle>
 which facilitates the use of C<listen()>-mode sockets. When a new connection
 is available on the socket it will C<accept()> it and pass the new client
 socket to its callback function.
 
 =head2 Timers
 
-A L<IO::Async::Timer::Countdown> object represents a counttime timer, which
+An L<IO::Async::Timer::Countdown> object represents a count time timer, which
 will invoke a callback after a given delay. It can be stopped and restarted.
 
-A L<IO::Async::Timer::Periodic> object invokes a callback at regular intervals
+An L<IO::Async::Timer::Periodic> object invokes a callback at regular intervals
 from its initial start time. It is reliable and will not drift due to the time
 taken to run the callback.
 
@@ -114,7 +114,7 @@
 
 =head2 Signals
 
-A L<IO::Async::Signal> object represents a POSIX signal, which will invoke a
+An L<IO::Async::Signal> object represents a POSIX signal, which will invoke a
 callback when the given signal is received by the process. Multiple objects
 watching the same signal can be used; they will all invoke in no particular
 order.
@@ -129,12 +129,12 @@
 =head2 Loops
 
 The L<IO::Async::Loop> object class represents an abstract collection of
-C<IO::Async::Notifier> objects, and manages the actual filehandle IO
-watches, timers, signal handlers, and other functionallity. It performs all
+L<IO::Async::Notifier> objects, and manages the actual filehandle IO
+watchers, timers, signal handlers, and other functionallity. It performs all
 of the abstract collection management tasks, and leaves the actual OS
 interactions to a particular subclass for the purpose.
 
-L<IO::Async::Loop::Poll> uses an C<IO::Poll> object for this test.
+L<IO::Async::Loop::Poll> uses an L<IO::Poll> object for this test.
 
 L<IO::Async::Loop::Select> uses the C<select()> syscall.
 
@@ -143,13 +143,13 @@
 a L<Glib>-based program, or L<IO::Async::Loop::Ppoll> which uses the
 L<IO::Ppoll> object to handle signals safely on Linux.
 
-As well as these general-purpose classes, the C<IO::Async::Loop> constructor
+As well as these general-purpose classes, the L<IO::Async::Loop> constructor
 also supports looking for OS-specific subclasses, in case a more efficient
 implementation exists for the specific OS it runs on.
 
 =head2 Child Processes
 
-The C<IO::Async::Loop> object provides a number of methods to facilitate the
+The L<IO::Async::Loop> object provides a number of methods to facilitate the
 running of child processes. C<spawn_child> is primarily a wrapper around the
 typical C<fork()>/C<exec()> style of starting child processes, C<open_child>
 builds on this to provide management of child process file handles and streams
@@ -183,7 +183,7 @@
 
 =head2 Networking
 
-The C<IO::Async::Loop> provides several methods for performing network-based
+The L<IO::Async::Loop> provides several methods for performing network-based
 tasks. Primarily, the C<connect> and C<listen> methods allow the creation of
 client or server network sockets. Additionally, the C<resolve> method allows
 the use of the system's name resolvers in an asynchronous way, to resolve
@@ -198,7 +198,7 @@
 
 =item *
 
-A C<IO::Async::Loop> subclass to perform integration with L<Event>. Consider
+An L<IO::Async::Loop> subclass to perform integration with L<Event>. Consider
 further ideas on Solaris' I<ports>, BSD's I<Kevents> and anything that might
 be useful on Win32.
 
@@ -208,7 +208,7 @@
 example, Win32 would probably need an extensively-different C<ChildManager>,
 or OSes may have specific ways to perform asynchronous name resolution
 operations better than the generic C<DetachedCode> approach. This should be
-easier to implement now that the C<IO::Async::Loop> magic constructor looks
+easier to implement now that the L<IO::Async::Loop> magic constructor looks
 for OS-specific subclasses first.
 
 =item *

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/ChildManager.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/ChildManager.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/ChildManager.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/ChildManager.pm Thu Mar 11 16:42:51 2010
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 # Not a notifier
 

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/Connector.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/Connector.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/Connector.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/Connector.pm Thu Mar 11 16:42:51 2010
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 use POSIX qw( EINPROGRESS );
 use Socket qw( SOL_SOCKET SO_ERROR );

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/DetachedCode.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/DetachedCode.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/DetachedCode.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/DetachedCode.pm Thu Mar 11 16:42:51 2010
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 use IO::Async::Stream;
 

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/Handle.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/Handle.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/Handle.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/Handle.pm Thu Mar 11 16:42:51 2010
@@ -9,7 +9,7 @@
 use warnings;
 use base qw( IO::Async::Notifier );
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 use Carp;
 use Scalar::Util qw( weaken );

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/Listener.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/Listener.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/Listener.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/Listener.pm Thu Mar 11 16:42:51 2010
@@ -1,7 +1,7 @@
 #  You may distribute under the terms of either the GNU General Public License
 #  or the Artistic License (the same terms as Perl itself)
 #
-#  (C) Paul Evans, 2008,2009 -- leonerd at leonerd.org.uk
+#  (C) Paul Evans, 2008-2010 -- leonerd at leonerd.org.uk
 
 package IO::Async::Listener;
 
@@ -9,14 +9,14 @@
 use warnings;
 use base qw( IO::Async::Handle );
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 use IO::Async::Handle;
 
 use POSIX qw( EAGAIN );
 use Socket::GetAddrInfo qw( :Socket6api AI_PASSIVE );
 
-use Socket qw( SO_ACCEPTCONN SO_REUSEADDR );
+use Socket qw( SOL_SOCKET SO_ACCEPTCONN SO_REUSEADDR );
 
 use Carp;
 
@@ -148,14 +148,17 @@
 
    if( exists $params{handle} ) {
       my $handle = delete $params{handle};
-      # Sanity check it
-      defined eval { $handle->sockname } or croak "IO handle $handle does not have a sockname";
+      # Sanity check it - it may be a bare GLOB ref, not an IO::Socket-derived handle
+      defined getsockname( $handle ) or croak "IO handle $handle does not have a sockname";
 
       # So now we know it's at least some kind of socket. Is it listening?
       # SO_ACCEPTCONN would tell us, but not all OSes implement it. Since it's
       # only a best-effort sanity check, we won't mind if the OS doesn't.
-      my $acceptconn = eval { $handle->sockopt( SO_ACCEPTCONN ) };
-      !defined $acceptconn or $acceptconn or croak "Socket is not accepting connections";
+      my $acceptconn = getsockopt( $handle, SOL_SOCKET, SO_ACCEPTCONN ) or croak "Cannot getsockopt - $!";
+      unpack( "I", $acceptconn ) or croak "Socket is not accepting connections";
+
+      # This is a bit naughty but hopefully nobody will mind...
+      bless $handle, "IO::Socket" if ref( $handle ) eq "GLOB";
 
       $self->SUPER::configure( read_handle => $handle );
    }

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/Loop.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/Loop.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/Loop.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/Loop.pm Thu Mar 11 16:42:51 2010
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 use constant NEED_API_VERSION => '0.24';
 
 use Carp;
@@ -1163,7 +1163,9 @@
 
 =item delay => NUM
 
-The delay after now at which to run the event, if C<time> is not supplied.
+The delay after now at which to run the event, if C<time> is not supplied. A
+zero or negative delayed timer should be executed as soon as possible; the
+next time the C<loop_once()> method is invoked.
 
 =item now => NUM
 

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/Loop/IO_Poll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/Loop/IO_Poll.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/Loop/IO_Poll.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/Loop/IO_Poll.pm Thu Mar 11 16:42:51 2010
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 use base qw( IO::Async::Loop::Poll );
 

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/Loop/Poll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/Loop/Poll.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/Loop/Poll.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/Loop/Poll.pm Thu Mar 11 16:42:51 2010
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 use constant API_VERSION => '0.24';
 
 use base qw( IO::Async::Loop );

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/Loop/Select.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/Loop/Select.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/Loop/Select.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/Loop/Select.pm Thu Mar 11 16:42:51 2010
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 use constant API_VERSION => '0.24';
 
 use base qw( IO::Async::Loop );

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/LoopTests.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/LoopTests.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/LoopTests.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/LoopTests.pm Thu Mar 11 16:42:51 2010
@@ -1,14 +1,14 @@
 #  You may distribute under the terms of either the GNU General Public License
 #  or the Artistic License (the same terms as Perl itself)
 #
-#  (C) Paul Evans, 2009 -- leonerd at leonerd.org.uk
+#  (C) Paul Evans, 2009,2010 -- leonerd at leonerd.org.uk
 
 package IO::Async::LoopTests;
 
 use strict;
 use warnings;
 
-use base qw( Exporter );
+use Exporter 'import';
 our @EXPORT = qw(
    run_tests
 );
@@ -22,7 +22,7 @@
 use POSIX qw( SIGTERM WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG );
 use Time::HiRes qw( time );
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 # Abstract Units of Time
 use constant AUT => $ENV{TEST_QUICK_TIMERS} ? 0.1 : 1;
@@ -268,7 +268,7 @@
 
 =cut
 
-use constant count_tests_timer => 8;
+use constant count_tests_timer => 10;
 sub run_tests_timer
 {
    my $done = 0;
@@ -320,6 +320,14 @@
    } 1.5, 2.5, 'requeued timer of delay 2';
 
    is( $done, 2, '$done is 2 after requeued timer' );
+
+   $loop->enqueue_timer( delay => -1, code => sub { $done = 1 } );
+
+   $done = 0;
+
+   time_between {
+      $loop->loop_once() while !$done;
+   } 0, 0.1, 'loop_once() while waiting for negative interval timer';
 }
 
 =head2 signal

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/MergePoint.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/MergePoint.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/MergePoint.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/MergePoint.pm Thu Mar 11 16:42:51 2010
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 use Carp;
 

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/Notifier.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/Notifier.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/Notifier.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/Notifier.pm Thu Mar 11 16:42:51 2010
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 use Carp;
 use Scalar::Util qw( weaken );

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/Resolver.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/Resolver.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/Resolver.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/Resolver.pm Thu Mar 11 16:42:51 2010
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 use Socket::GetAddrInfo qw( :Socket6api getaddrinfo getnameinfo );
 use Socket qw( SOCK_STREAM SOCK_DGRAM SOCK_RAW );

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/Sequencer.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/Sequencer.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/Sequencer.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/Sequencer.pm Thu Mar 11 16:42:51 2010
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 use base qw( IO::Async::Stream );
 

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/Signal.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/Signal.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/Signal.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/Signal.pm Thu Mar 11 16:42:51 2010
@@ -9,7 +9,7 @@
 use warnings;
 use base qw( IO::Async::Notifier );
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 use Carp;
 use Scalar::Util qw( weaken );

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/Stream.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/Stream.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/Stream.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/Stream.pm Thu Mar 11 16:42:51 2010
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 use base qw( IO::Async::Handle );
 

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/Test.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/Test.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/Test.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/Test.pm Thu Mar 11 16:42:51 2010
@@ -1,17 +1,16 @@
 #  You may distribute under the terms of either the GNU General Public License
 #  or the Artistic License (the same terms as Perl itself)
 #
-#  (C) Paul Evans, 2007,2008 -- leonerd at leonerd.org.uk
+#  (C) Paul Evans, 2007-2010 -- leonerd at leonerd.org.uk
 
 package IO::Async::Test;
 
 use strict;
 use warnings;
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
-use Exporter;
-our @ISA = qw( Exporter );
+use Exporter 'import';
 our @EXPORT = qw(
    testing_loop
    wait_for

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/Timer.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/Timer.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/Timer.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/Timer.pm Thu Mar 11 16:42:51 2010
@@ -9,7 +9,7 @@
 use warnings;
 use base qw( IO::Async::Notifier );
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 use Carp;
 
@@ -130,7 +130,7 @@
    my $loop = $self->get_loop;
    if( !defined $loop ) {
       $self->{pending} = 1;
-      return;
+      return $self;
    }
 
    defined $self->{id} and croak "Cannot start a Timer that is already running";

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/Timer/Countdown.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/Timer/Countdown.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/Timer/Countdown.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/Timer/Countdown.pm Thu Mar 11 16:42:51 2010
@@ -9,7 +9,7 @@
 use warnings;
 use base qw( IO::Async::Timer );
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 use Carp;
 use Scalar::Util qw( weaken );

Modified: branches/upstream/libio-async-perl/current/lib/IO/Async/Timer/Periodic.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/lib/IO/Async/Timer/Periodic.pm?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/lib/IO/Async/Timer/Periodic.pm (original)
+++ branches/upstream/libio-async-perl/current/lib/IO/Async/Timer/Periodic.pm Thu Mar 11 16:42:51 2010
@@ -9,7 +9,7 @@
 use warnings;
 use base qw( IO::Async::Timer );
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 use Carp;
 use Scalar::Util qw( weaken );

Modified: branches/upstream/libio-async-perl/current/t/22timer-countdown.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libio-async-perl/current/t/22timer-countdown.t?rev=54105&op=diff
==============================================================================
--- branches/upstream/libio-async-perl/current/t/22timer-countdown.t (original)
+++ branches/upstream/libio-async-perl/current/t/22timer-countdown.t Thu Mar 11 16:42:51 2010
@@ -4,7 +4,7 @@
 
 use IO::Async::Test;
 
-use Test::More tests => 39;
+use Test::More tests => 40;
 use Test::Exception;
 use Test::Refcount;
 
@@ -72,9 +72,9 @@
 
 undef $expired;
 
+is( $timer->start, $timer, '$timer->start out of a Loop returns $timer' );
+
 $loop->add( $timer );
-
-$timer->start;
 
 time_about( sub { wait_for { $expired } }, 2, 'Timer works a second time' );
 




More information about the Pkg-perl-cvs-commits mailing list