r74256 - in /branches/upstream/libanyevent-perl/current: ./ lib/ lib/AnyEvent/ lib/AnyEvent/Impl/ lib/AnyEvent/Util/ util/

ghedo-guest at users.alioth.debian.org ghedo-guest at users.alioth.debian.org
Thu May 12 14:47:02 UTC 2011


Author: ghedo-guest
Date: Thu May 12 14:46:45 2011
New Revision: 74256

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=74256
Log:
[svn-upgrade] new version libanyevent-perl (5.340)

Added:
    branches/upstream/libanyevent-perl/current/META.json
    branches/upstream/libanyevent-perl/current/util/tst_uts46data   (with props)
Removed:
    branches/upstream/libanyevent-perl/current/META.yml
Modified:
    branches/upstream/libanyevent-perl/current/Changes
    branches/upstream/libanyevent-perl/current/MANIFEST
    branches/upstream/libanyevent-perl/current/lib/AnyEvent.pm
    branches/upstream/libanyevent-perl/current/lib/AnyEvent/FAQ.pod
    branches/upstream/libanyevent-perl/current/lib/AnyEvent/Handle.pm
    branches/upstream/libanyevent-perl/current/lib/AnyEvent/Impl/EventLib.pm
    branches/upstream/libanyevent-perl/current/lib/AnyEvent/TLS.pm
    branches/upstream/libanyevent-perl/current/lib/AnyEvent/Util.pm
    branches/upstream/libanyevent-perl/current/lib/AnyEvent/Util/uts46data.pl
    branches/upstream/libanyevent-perl/current/util/gen_uts46data

Modified: branches/upstream/libanyevent-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libanyevent-perl/current/Changes?rev=74256&op=diff
==============================================================================
--- branches/upstream/libanyevent-perl/current/Changes (original)
+++ branches/upstream/libanyevent-perl/current/Changes Thu May 12 14:46:45 2011
@@ -4,6 +4,28 @@
 TODO: catch AE::xxx for anyevent strict and anyevent debug
 TODO: anyevent::trace? or debug tracing all watchers?
 TODO: anyevent strict checking for $_ changes?
+TODO: break the API and put the rr ttl where it belongs.
+TODO: Kevin Ryde         (3.8K)   1 inbox       Glib child processes
+
+5.34  Thu May 12 09:59:41 CEST 2011
+	- AE::TLS didn't support both cert_file and key at the same time,
+          due to some copy&paste bug (reported and analyzed by vti).
+	- improve AE::Handle timeout documentation slightly.
+
+5.33  Mon Feb  7 21:51:41 CET 2011
+	- never appeared on CPAN, for unknown reasons.
+	- AnyEvent::Handle on_connect_error - do not try to destroy a handle
+          object when it's already gone (analyzed by Ryan Bullock).
+	- update idna algorithm(s) to UTS#46 version 6.0.0.
+        - preserve trailing dot in idn_to_ascii - testsuite says to preserve,
+          uts46 says it's an error, and testsuite makes more sense.
+        - remove leading dots in idn_to_ascii - testsuite says to remove,
+          uts46 says it's an error, and testsuite makes more sense.
+        - fixed a bug in idn ignored character processing.
+        - passes the uts46 6.0.0 testsuite except for three cases which
+          apparently are bugs in the testsuite itself.
+        - passes the uts46 6.0.1 testsuite except for eleven cases which
+          apparently are bugs in the testsuite itself.
 
 5.31  Sun Jan 23 11:49:19 CET 2011
 	- work around a POE bug where POE would first poll for new events and
@@ -11,7 +33,9 @@
 	- 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.
+	- update to common::sense 3.4 warning set (some warnings in perl impose
+          an arbitrary 32kb limit on regex matches, which affects
+          AnyEvent::Handle).
         - AE::Handle had a broken rbuf_max method and missing wbuf_max method.
         - new experimental AE::Handle::resettls method.
 

Modified: branches/upstream/libanyevent-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libanyevent-perl/current/MANIFEST?rev=74256&op=diff
==============================================================================
--- branches/upstream/libanyevent-perl/current/MANIFEST (original)
+++ branches/upstream/libanyevent-perl/current/MANIFEST Thu May 12 14:46:45 2011
@@ -55,4 +55,5 @@
 eg/ae2.pl
 
 util/gen_uts46data
-META.yml                                 Module meta-data (added by MakeMaker)
+util/tst_uts46data
+META.json                                Module meta-data (added by MakeMaker)

Added: branches/upstream/libanyevent-perl/current/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libanyevent-perl/current/META.json?rev=74256&op=file
==============================================================================
--- branches/upstream/libanyevent-perl/current/META.json (added)
+++ branches/upstream/libanyevent-perl/current/META.json Thu May 12 14:46:45 2011
@@ -1,0 +1,34 @@
+{
+   "no_index" : {
+      "directory" : [
+         "t",
+         "inc"
+      ]
+   },
+   "meta-spec" : {
+      "version" : 1.4,
+      "url" : "http://module-build.sourceforge.net/META-spec-v1.4.html"
+   },
+   "generated_by" : "ExtUtils::MakeMaker::JSONMETA version 7.000",
+   "distribution_type" : "module",
+   "version" : "5.34",
+   "name" : "AnyEvent",
+   "author" : [],
+   "license" : "unknown",
+   "build_requires" : {
+      "ExtUtils::MakeMaker" : 0
+   },
+   "requires" : {},
+   "recommends" : {
+      "Net::SSLeay" : 1.33,
+      "Guard" : 1.02,
+      "EV" : 4,
+      "Async::Interrupt" : 1,
+      "JSON::XS" : 2.2,
+      "JSON" : 2.09
+   },
+   "abstract" : null,
+   "configure_requires" : {
+      "ExtUtils::MakeMaker" : 0
+   }
+}

Modified: branches/upstream/libanyevent-perl/current/lib/AnyEvent.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libanyevent-perl/current/lib/AnyEvent.pm?rev=74256&op=diff
==============================================================================
--- branches/upstream/libanyevent-perl/current/lib/AnyEvent.pm (original)
+++ branches/upstream/libanyevent-perl/current/lib/AnyEvent.pm Thu May 12 14:46:45 2011
@@ -1163,7 +1163,7 @@
 
 use Carp ();
 
-our $VERSION = '5.31';
+our $VERSION = '5.34';
 our $MODEL;
 
 our $AUTOLOAD;

Modified: branches/upstream/libanyevent-perl/current/lib/AnyEvent/FAQ.pod
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libanyevent-perl/current/lib/AnyEvent/FAQ.pod?rev=74256&op=diff
==============================================================================
--- branches/upstream/libanyevent-perl/current/lib/AnyEvent/FAQ.pod (original)
+++ branches/upstream/libanyevent-perl/current/lib/AnyEvent/FAQ.pod Thu May 12 14:46:45 2011
@@ -79,23 +79,26 @@
 
 Many people try out this simple program, or it's equivalent:
 
+   use AnyEvent;
    AnyEvent->condvar->recv;
 
 They are then shocked to see that this basically idles with the Perl
 backend, but uses 100% CPU with the EV backend, which is supposed to be
 sooo efficient.
 
-The key to understand this is to understand that the above program is
-actually buggy: Nothing calls C<< ->send >> on the condvar, ever. Worse,
-there are no event watchers whatsoever. Basically, it creates a deadlock:
-there is no way to make progress.
+The key to understand this is to understand that the above program
+is actually I<buggy>: Nothing calls C<< ->send >> on the condvar,
+ever. Worse, there are no event watchers whatsoever. Basically, it creates
+a deadlock: there is no way to make progress, this program doesn't do
+anything useful, and this will not change in the future: it is already an
+ex-parrot.
 
-Some backends handle this by freezing, some by idling, and some do a 100%
-cpu loop.
+Some backends react to this by freezing, some by idling, and some do a
+100% CPU loop.
 
-Since this program is nonsensical (and behaves as documented with all
-backends, as AnyEvent makes no CPU tikme guarantees), this shouldn't be a
-big deal - as soon as your program actually implements something sensible,
+Since this program is not useful (and behaves as documented with all
+backends, as AnyEvent makes no CPU time guarantees), this shouldn't be a
+big deal: as soon as your program actually implements I<something>, the
 CPU usage will be normal.
 
 =head2 Why does this FAQ not deal with L<AnyEvent::Handle> questions?

Modified: branches/upstream/libanyevent-perl/current/lib/AnyEvent/Handle.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libanyevent-perl/current/lib/AnyEvent/Handle.pm?rev=74256&op=diff
==============================================================================
--- branches/upstream/libanyevent-perl/current/lib/AnyEvent/Handle.pm (original)
+++ branches/upstream/libanyevent-perl/current/lib/AnyEvent/Handle.pm Thu May 12 14:46:45 2011
@@ -249,21 +249,26 @@
 will be invoked (and if that one is missing, a non-fatal C<ETIMEDOUT>
 error will be raised).
 
-There are three variants of the timeouts that work independently
-of each other, for both read and write, just read, and just write:
+There are three variants of the timeouts that work independently of each
+other, for both read and write (triggered when nothing was read I<OR>
+written), just read (triggered when nothing was read), and just write:
 C<timeout>, C<rtimeout> and C<wtimeout>, with corresponding callbacks
 C<on_timeout>, C<on_rtimeout> and C<on_wtimeout>, and reset functions
 C<timeout_reset>, C<rtimeout_reset>, and C<wtimeout_reset>.
 
-Note that timeout processing is active even when you do not have
-any outstanding read or write requests: If you plan to keep the connection
-idle then you should disable the timeout temporarily or ignore the timeout
-in the C<on_timeout> callback, in which case AnyEvent::Handle will simply
-restart the timeout.
-
-Zero (the default) disables this timeout.
+Note that timeout processing is active even when you do not have any
+outstanding read or write requests: If you plan to keep the connection
+idle then you should disable the timeout temporarily or ignore the
+timeout in the corresponding C<on_timeout> callback, in which case
+AnyEvent::Handle will simply restart the timeout.
+
+Zero (the default) disables the corresponding timeout.
 
 =item on_timeout => $cb->($handle)
+
+=item on_rtimeout => $cb->($handle)
+
+=item on_wtimeout => $cb->($handle)
 
 Called whenever the inactivity timeout passes. If you return from this
 callback, then the timeout will be reset as if some activity had happened,
@@ -538,7 +543,7 @@
                   } else {
                      if ($self->{on_connect_error}) {
                         $self->{on_connect_error}($self, "$!");
-                        $self->destroy;
+                        $self->destroy if $self;
                      } else {
                         $self->_error ($!, 1);
                      }
@@ -780,6 +785,9 @@
 =item $handle->wtimeout ($seconds)
 
 Configures (or disables) the inactivity timeout.
+
+The timeout will be checked instantly, so this method might destroy the
+handle before it returns.
 
 =item $handle->timeout_reset
 

Modified: branches/upstream/libanyevent-perl/current/lib/AnyEvent/Impl/EventLib.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libanyevent-perl/current/lib/AnyEvent/Impl/EventLib.pm?rev=74256&op=diff
==============================================================================
--- branches/upstream/libanyevent-perl/current/lib/AnyEvent/Impl/EventLib.pm (original)
+++ branches/upstream/libanyevent-perl/current/lib/AnyEvent/Impl/EventLib.pm Thu May 12 14:46:45 2011
@@ -39,6 +39,10 @@
 
 It also doesn't work around the Windows bug of not signalling TCP
 connection failures.
+
+It also doesn't work with many special devices on Linux (F</dev/random>
+works, F</dev/urandom> fails, F</dev/tty> works, F</dev/null> fails and so
+on).
 
 Event::Lib does not support idle watchers. They could be emulated using
 low-priority timers but as the priority range (and availability) is not

Modified: branches/upstream/libanyevent-perl/current/lib/AnyEvent/TLS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libanyevent-perl/current/lib/AnyEvent/TLS.pm?rev=74256&op=diff
==============================================================================
--- branches/upstream/libanyevent-perl/current/lib/AnyEvent/TLS.pm (original)
+++ branches/upstream/libanyevent-perl/current/lib/AnyEvent/TLS.pm Thu May 12 14:46:45 2011
@@ -684,7 +684,7 @@
       if (exists $arg{key} or exists $arg{key_file}) {
          if (exists $arg{key}) {
             croak "specifying both key_file and key is not allowed"
-               if exists $arg{cert_file};
+               if exists $arg{key_file};
            ($arg{key_file}, $g2) = _tmpfile delete $arg{key};
          }
       } else {

Modified: branches/upstream/libanyevent-perl/current/lib/AnyEvent/Util.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libanyevent-perl/current/lib/AnyEvent/Util.pm?rev=74256&op=diff
==============================================================================
--- branches/upstream/libanyevent-perl/current/lib/AnyEvent/Util.pm (original)
+++ branches/upstream/libanyevent-perl/current/lib/AnyEvent/Util.pm Thu May 12 14:46:45 2011
@@ -558,7 +558,7 @@
                      -newkey rsa:2048 -keyout /dev/fd/3
                      -batch -subj /CN=AnyEvent
                     )],
-      "<", "dev/null",
+      "<", "/dev/null",
       ">" , \my $cert,
       "3>", \my $key,
       "2>", "/dev/null";
@@ -763,7 +763,7 @@
 
 Implements the IDNA nameprep normalisation algorithm. Or actually the
 UTS#46 algorithm. Or maybe something similar - reality is complicated
-btween IDNA2003, UTS#46 and IDNA2008. If C<$display> is true then the name
+between IDNA2003, UTS#46 and IDNA2008. If C<$display> is true then the name
 is prepared for display, otherwise it is prepared for lookup (default).
 
 If you have no clue what this means, look at C<idn_to_ascii> instead.
@@ -807,9 +807,9 @@
             # not in valid class, search for mapping
             utf8::encode $chr; # the imap table is in utf-8
             (my $rep = index $uts46_imap, "\x00$chr") >= 0
-               or Carp::croak "$_[0]: disallowed characters during idn_nameprep";
-
-            (substr $uts46_imap, $rep, 128) =~ /\x00 .[\x80-\xbf]* ([^\x00]+) \x00/x
+               or Carp::croak "$_[0]: disallowed characters ($chr) during idn_nameprep" . unpack "H*", $chr;
+
+            (substr $uts46_imap, $rep, 128) =~ /\x00 .[\x80-\xbf]* ([^\x00]*) \x00/x
                or die "FATAL: idn_nameprep imap table has unexpected contents";
 
             $rep = $1;
@@ -845,7 +845,7 @@
    }gex;
 
    # uts46 verification
-   /\.-|-\.|\.\./
+   /\.-|-\./
       and Carp::croak "$_[0]: invalid hyphens detected during idn_nameprep";
 
    # missing: label begin with combining mark, idna2008 bidi
@@ -892,7 +892,7 @@
 
    eval {
       # punycode by label
-      for (split /\./, idn_nameprep $_[0]) {
+      for (split /\./, (idn_nameprep $_[0]), -1) {
          if (/[^\x00-\x7f]/) {
             eval {
                push @output, "xn--" . punycode_encode $_;
@@ -908,6 +908,9 @@
       1
    } or return $_[0];
 
+   shift @output
+      while !length $output[0] && @output > 1;
+
    join ".", @output
 }
 

Modified: branches/upstream/libanyevent-perl/current/lib/AnyEvent/Util/uts46data.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libanyevent-perl/current/lib/AnyEvent/Util/uts46data.pl?rev=74256&op=diff
==============================================================================
Binary files - no diff available.

Modified: branches/upstream/libanyevent-perl/current/util/gen_uts46data
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libanyevent-perl/current/util/gen_uts46data?rev=74256&op=diff
==============================================================================
--- branches/upstream/libanyevent-perl/current/util/gen_uts46data (original)
+++ branches/upstream/libanyevent-perl/current/util/gen_uts46data Thu May 12 14:46:45 2011
@@ -8,7 +8,7 @@
 
 binmode STDOUT, ":utf8";
 
-open my $fh, "GET http://www.unicode.org/Public/idna/5.2.0/IdnaMappingTable.txt |"
+open my $fh, "GET http://www.unicode.org/Public/idna/6.0.0/IdnaMappingTable.txt |"
    or die;
 
 my $valid;
@@ -21,6 +21,7 @@
     ([0-9A-F]{4,}) (?: \.\.([0-9A-F]{4,}) )?
     \s*;\s*(\S+)
     (?: \s*;\s*([0-9A-F ]+?) )?
+    (?: \s*;[^;]+ )?
     \s*
     (?: \#.* )?
     $
@@ -34,16 +35,16 @@
    $map = join "", map chr hex, split ' ', $map;
 
    given ($type) {
-      when ("disallowed") {
+      when (/^(?:disallowed|disallowed_STD3_valid|disallowed_STD3_mapped)$/) {
          # nop
       }
-      when (/mapped|deviation|ignored/) {
+      when (/^(?:mapped|deviation|ignored)$/) {
          $map = "\x01$map" if $type eq "deviation";
 
          $imap .= "\x00" . chr . $map
             for $r1 .. $r2 || $r1;
       }
-      when ("valid") {
+      when (/^(?:valid)$/) {
          (vec $valid, $_, 1) = 1
             for $r1 .. $r2 || $r1;
       }

Added: branches/upstream/libanyevent-perl/current/util/tst_uts46data
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libanyevent-perl/current/util/tst_uts46data?rev=74256&op=file
==============================================================================
--- branches/upstream/libanyevent-perl/current/util/tst_uts46data (added)
+++ branches/upstream/libanyevent-perl/current/util/tst_uts46data Thu May 12 14:46:45 2011
@@ -1,0 +1,47 @@
+#!/opt/bin/perl
+
+# tests installed AnyEvent against IdnaTest.pl
+
+use common::sense;
+use utf8;
+no warnings 'utf8';
+
+use Encode;
+use AnyEvent::Util;
+
+open my $fh, "GET http://www.unicode.org/Public/idna/6.0.1/IdnaTest.txt |"
+   or die;
+
+while (<$fh>) {
+   next unless /^[TB]/; # no "N", we implement transitional only
+
+   chomp;
+
+   utf8::decode $_
+      or die "utf8 decode error: $_\n";
+
+   s/\\u(d[8-f][0-9a-f]{2})\\u(d[8-f][0-9a-f]{2})/Encode::decode "utf-16be", pack "nn", hex $1, hex $2/ige;
+   s/\\u([0-9a-fA-F]{4})/chr hex $1/ge;
+
+   my ($type, $source, $tou, $toa, $nv8) = split /[ \t]*;[ \t]*/;
+
+   $toa = lc $toa;
+
+   my $xtou =    AnyEvent::Util::idn_to_unicode $source;
+   my $xtoa = lc AnyEvent::Util::idn_to_ascii   $source;
+
+   $xtoa = "[error]" unless defined $xtoa;
+   $xtou = "[error]" unless defined $xtou;
+
+   if ($tou ne $xtou && ($tou ne "" || $xtou ne $source)) {
+      warn "$. TOU ERROR $type ($source expect $tou got $xtou) ($@)\n"
+         unless $tou =~ /^\[/;
+   }
+
+   if ($toa ne $xtoa && ($toa ne "" || $xtoa ne lc $source)) {
+#      use Data::Dump; ddx [$source, $toa, $xtoa] unless $toa =~ /^\[/;
+      warn "$. TOA ERROR $type ($source expect $toa got $xtoa) ($@)\n"
+         unless $toa =~ /^\[/;
+   }
+}
+

Propchange: branches/upstream/libanyevent-perl/current/util/tst_uts46data
------------------------------------------------------------------------------
    svn:executable = *




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