r67838 - in /trunk/libanyevent-perl: Changes META.yml debian/changelog lib/AnyEvent.pm lib/AnyEvent/DNS.pm lib/AnyEvent/Handle.pm lib/AnyEvent/Impl/EventLib.pm lib/AnyEvent/Impl/POE.pm lib/AnyEvent/Socket.pm

periapt-guest at users.alioth.debian.org periapt-guest at users.alioth.debian.org
Mon Jan 24 22:44:19 UTC 2011


Author: periapt-guest
Date: Mon Jan 24 22:44:13 2011
New Revision: 67838

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=67838
Log:
New upstream release

Modified:
    trunk/libanyevent-perl/Changes
    trunk/libanyevent-perl/META.yml
    trunk/libanyevent-perl/debian/changelog
    trunk/libanyevent-perl/lib/AnyEvent.pm
    trunk/libanyevent-perl/lib/AnyEvent/DNS.pm
    trunk/libanyevent-perl/lib/AnyEvent/Handle.pm
    trunk/libanyevent-perl/lib/AnyEvent/Impl/EventLib.pm
    trunk/libanyevent-perl/lib/AnyEvent/Impl/POE.pm
    trunk/libanyevent-perl/lib/AnyEvent/Socket.pm

Modified: trunk/libanyevent-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libanyevent-perl/Changes?rev=67838&op=diff
==============================================================================
--- trunk/libanyevent-perl/Changes (original)
+++ trunk/libanyevent-perl/Changes Mon Jan 24 22:44:13 2011
@@ -4,6 +4,16 @@
 TODO: catch AE::xxx for anyevent strict and anyevent debug
 TODO: anyevent::trace? or debug tracing all watchers?
 TODO: anyevent strict checking for $_ changes?
+
+5.31  Sun Jan 23 11:49:19 CET 2011
+	- work around a POE bug where POE would first poll for new events and
+          invoke handlers BEFORE handling the message queue.
+	- fix parsing of "domain" statement in resolv.conf (Johannes Plunien).
+	- stop_read now does just that in TLS mode. see its
+          documentation for caveats.
+	- update to common::sense 3.4 warning set.
+        - AE::Handle had a broken rbuf_max method and missing wbuf_max method.
+        - new experimental AE::Handle::resettls method.
 
 5.3    Fri Dec 31 05:48:13 CET 2010
 	- major IOAsync patch by Paul Evans - 0.33 is required, as the major

Modified: trunk/libanyevent-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libanyevent-perl/META.yml?rev=67838&op=diff
==============================================================================
--- trunk/libanyevent-perl/META.yml (original)
+++ trunk/libanyevent-perl/META.yml Mon Jan 24 22:44:13 2011
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               AnyEvent
-version:            5.3
+version:            5.31
 abstract:           ~
 author:  []
 license:            unknown

Modified: trunk/libanyevent-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libanyevent-perl/debian/changelog?rev=67838&op=diff
==============================================================================
--- trunk/libanyevent-perl/debian/changelog (original)
+++ trunk/libanyevent-perl/debian/changelog Mon Jan 24 22:44:13 2011
@@ -1,3 +1,9 @@
+libanyevent-perl (5.310-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Nicholas Bamber <nicholas at periapt.co.uk>  Mon, 24 Jan 2011 22:45:54 +0000
+
 libanyevent-perl (5.300-1) unstable; urgency=low
 
   [ Jonathan Yu ]

Modified: trunk/libanyevent-perl/lib/AnyEvent.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libanyevent-perl/lib/AnyEvent.pm?rev=67838&op=diff
==============================================================================
--- trunk/libanyevent-perl/lib/AnyEvent.pm (original)
+++ trunk/libanyevent-perl/lib/AnyEvent.pm Mon Jan 24 22:44:13 2011
@@ -1153,8 +1153,8 @@
 
 # basically a tuned-down version of common::sense
 sub common_sense {
-   # from common:.sense 3.3
-   ${^WARNING_BITS} ^= ${^WARNING_BITS} ^ "\x3c\x3f\x33\x00\x0f\xf3\x0f\xc0\xf0\xfc\x33\x00";
+   # from common:.sense 3.4
+   ${^WARNING_BITS} ^= ${^WARNING_BITS} ^ "\x3c\x3f\x33\x00\x0f\xf0\x0f\xc0\xf0\xfc\x33\x00";
    # use strict vars subs - NO UTF-8, as Util.pm doesn't like this atm. (uts46data.pl)
    $^H |= 0x00000600;
 }
@@ -1163,7 +1163,7 @@
 
 use Carp ();
 
-our $VERSION = '5.3';
+our $VERSION = '5.31';
 our $MODEL;
 
 our $AUTOLOAD;

Modified: trunk/libanyevent-perl/lib/AnyEvent/DNS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libanyevent-perl/lib/AnyEvent/DNS.pm?rev=67838&op=diff
==============================================================================
--- trunk/libanyevent-perl/lib/AnyEvent/DNS.pm (original)
+++ trunk/libanyevent-perl/lib/AnyEvent/DNS.pm Mon Jan 24 22:44:13 2011
@@ -63,7 +63,16 @@
 
 =item AnyEvent::DNS::txt $domain, $cb->(@hostnames)
 
-Tries to resolve the given domain name into a list of text records.
+Tries to resolve the given domain name into a list of text records. Only
+the first text string per record will be returned. If you want all
+strings, you need to call the resolver manually:
+
+   resolver->resolve ($domain => "txt", sub {
+      for my $record (@_) {
+         my (undef, undef, undef, @txt) = @$record;
+         # strings now in @txt
+      }
+   });
 
 =item AnyEvent::DNS::srv $service, $proto, $domain, $cb->(@srv_rr)
 
@@ -838,7 +847,7 @@
          } else {
             warn "nameserver $ip invalid and ignored\n";
          }
-      } elsif (/^\s*domain\s+(\S*)\s+$/i) {
+      } elsif (/^\s*domain\s+(\S*)\s*$/i) {
          $self->{search} = [$1];
       } elsif (/^\s*search\s+(.*?)\s*$/i) {
          $self->{search} = [split /\s+/, $1];

Modified: trunk/libanyevent-perl/lib/AnyEvent/Handle.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libanyevent-perl/lib/AnyEvent/Handle.pm?rev=67838&op=diff
==============================================================================
--- trunk/libanyevent-perl/lib/AnyEvent/Handle.pm (original)
+++ trunk/libanyevent-perl/lib/AnyEvent/Handle.pm Mon Jan 24 22:44:13 2011
@@ -767,7 +767,7 @@
    $_[0]{rbuf_max} = $_[1];
 }
 
-sub rbuf_max {
+sub wbuf_max {
    $_[0]{wbuf_max} = $_[1];
 }
 
@@ -1089,7 +1089,7 @@
 C<low_water_mark> to C<0>). This method is a shorthand for just that, and
 replaces the C<on_drain> callback with:
 
-   sub { shutdown $_[0]{fh}, 1 }    # for push_shutdown
+   sub { shutdown $_[0]{fh}, 1 }
 
 This simply shuts down the write side and signals an EOF condition to the
 the peer.
@@ -1775,15 +1775,24 @@
 will automatically C<stop_read> for you when neither C<on_read> is set nor
 there are any read requests in the queue.
 
-These methods will have no effect when in TLS mode (as TLS doesn't support
-half-duplex connections).
+In older versions of this module (<= 5.3), these methods had no effect,
+as TLS does not support half-duplex connections. In current versions they
+work as expected, as this behaviour is required to avoid certain resource
+attacks, where the program would be forced to read (and buffer) arbitrary
+amounts of data before being able to send some data. The drawback is that
+some readings of the the SSL/TLS specifications basically require this
+attack to be working, as SSL/TLS implementations might stall sending data
+during a rehandshake.
+
+As a guideline, during the initial handshake, you should not stop reading,
+and as a client, it might cause problems, depending on your applciation.
 
 =cut
 
 sub stop_read {
    my ($self) = @_;
 
-   delete $self->{_rw} unless $self->{tls};
+   delete $self->{_rw};
 }
 
 sub start_read {
@@ -2043,6 +2052,19 @@
    delete @$self{qw(_rbio _wbio _tls_wbuf _on_starttls)};
 }
 
+=item $handle->resettls
+
+This rarely-used method simply resets and TLS state on the handle, usually
+causing data loss.
+
+One case where it may be useful is when you want to skip over the data in
+the stream but you are not interested in interpreting it, so data loss is
+no concern.
+
+=cut
+
+*resettls = \&_freetls;
+
 sub DESTROY {
    my ($self) = @_;
 

Modified: trunk/libanyevent-perl/lib/AnyEvent/Impl/EventLib.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libanyevent-perl/lib/AnyEvent/Impl/EventLib.pm?rev=67838&op=diff
==============================================================================
--- trunk/libanyevent-perl/lib/AnyEvent/Impl/EventLib.pm (original)
+++ trunk/libanyevent-perl/lib/AnyEvent/Impl/EventLib.pm Mon Jan 24 22:44:13 2011
@@ -15,17 +15,24 @@
 do anything to make Event work with AnyEvent except by loading Event::Lib
 before creating the first AnyEvent watcher.
 
-The L<Event::Lib> module suffers from the same limitations and bugs
-as libevent, most notably it kills already-installed watchers on a
-file descriptor and it is unable to support fork. These are not fatal
-issues, but L<Event::Lib> itself has many additional bugs such as taking
-references to file handles and callbacks instead of making a copy, causing
-memory corruption and random crashes. Only Tk rivals it in its brokenness.
+Note: the AnyEvent author has not found recent releases of Event::Lib to
+be even remotely working (not even the examples from the manpage or the
+testsuite work), so this event backend should be avoided (or somebody
+should step up and maintain it, hint, hint).
 
-This adaptor module employs the same workaround around the watcher problem
-as Tk and should therefore be avoided. (This was done for simplicity, one
-could in theory work around the problems with lower overhead by managing
-our own watchers).
+The L<Event::Lib> module suffers from the same limitations and bugs as
+libevent, most notably it kills already-installed watchers on a file
+descriptor and it is unable to support fork. These are not fatal issues,
+and are worked-around by this module, but the L<Event::Lib> perl module
+itself has many additional bugs such as taking references to file handles
+and callbacks instead of making a copy or freeing still-allocated scalars,
+causing memory corruption and random crashes. Only Tk rivals it in its
+brokenness.
+
+This adaptor module employs the same workaround around the watcher
+problems as Tk and should therefore be avoided. (This was done for
+simplicity, one could in theory work around the problems with lower
+overhead by managing our own watchers).
 
 Event::Lib also leaks file handles and memory and tends to just exit on
 problems.

Modified: trunk/libanyevent-perl/lib/AnyEvent/Impl/POE.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libanyevent-perl/lib/AnyEvent/Impl/POE.pm?rev=67838&op=diff
==============================================================================
--- trunk/libanyevent-perl/lib/AnyEvent/Impl/POE.pm (original)
+++ trunk/libanyevent-perl/lib/AnyEvent/Impl/POE.pm Mon Jan 24 22:44:13 2011
@@ -389,7 +389,7 @@
 }
 
 sub DESTROY {
-   POE::Kernel->post (${${$_[0]}}, "stop");
+   POE::Kernel->call (${${$_[0]}}, "stop");
 }
 
 sub one_event {

Modified: trunk/libanyevent-perl/lib/AnyEvent/Socket.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libanyevent-perl/lib/AnyEvent/Socket.pm?rev=67838&op=diff
==============================================================================
--- trunk/libanyevent-perl/lib/AnyEvent/Socket.pm (original)
+++ trunk/libanyevent-perl/lib/AnyEvent/Socket.pm Mon Jan 24 22:44:13 2011
@@ -777,7 +777,7 @@
 each in turn.
 
 After the connection is established, then the C<$connect_cb> will be
-invoked with the socket file handle (in non-blocking mode) as first and
+invoked with the socket file handle (in non-blocking mode) as first, and
 the peer host (as a textual IP address) and peer port as second and third
 arguments, respectively. The fourth argument is a code reference that you
 can call if, for some reason, you don't like this connection, which will
@@ -951,7 +951,7 @@
                      # cygwin 1.5 continously reports "ready' but never delivers
                      # an error with getpeername or sysread.
                      # cygwin 1.7 only reports readyness *once*, but is otherwise
-                     # the same, which is atcually more broken.
+                     # the same, which is actually more broken.
                      # Work around both by using unportable SO_ERROR for cygwin.
                      $! = (unpack "l", getsockopt $state{fh}, Socket::SOL_SOCKET(), Socket::SO_ERROR()) || Errno::EAGAIN
                         if AnyEvent::CYGWIN && $! == Errno::EAGAIN;
@@ -1001,7 +1001,7 @@
 
 For each new connection that could be C<accept>ed, call the C<<
 $accept_cb->($fh, $host, $port) >> with the file handle (in non-blocking
-mode) as first and the peer host and port as second and third arguments
+mode) as first, and the peer host and port as second and third arguments
 (see C<tcp_connect> for details).
 
 Croaks on any errors it can detect before the listen.
@@ -1009,7 +1009,7 @@
 If called in non-void context, then this function returns a guard object
 whose lifetime it tied to the TCP server: If the object gets destroyed,
 the server will be stopped (but existing accepted connections will
-continue).
+not be affected).
 
 If you need more control over the listening socket, you can provide a
 C<< $prepare_cb->($fh, $host, $port) >>, which is called just before the




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