r41727 - in /branches/upstream/libpoe-component-client-keepalive-perl/current: CHANGES Client-Keepalive.pm META.yml Makefile.PL

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Wed Aug 12 16:09:16 UTC 2009


Author: gregoa
Date: Wed Aug 12 16:09:10 2009
New Revision: 41727

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=41727
Log:
[svn-upgrade] Integrating new upstream version, libpoe-component-client-keepalive-perl (0.2600)

Modified:
    branches/upstream/libpoe-component-client-keepalive-perl/current/CHANGES
    branches/upstream/libpoe-component-client-keepalive-perl/current/Client-Keepalive.pm
    branches/upstream/libpoe-component-client-keepalive-perl/current/META.yml
    branches/upstream/libpoe-component-client-keepalive-perl/current/Makefile.PL

Modified: branches/upstream/libpoe-component-client-keepalive-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-client-keepalive-perl/current/CHANGES?rev=41727&op=diff
==============================================================================
--- branches/upstream/libpoe-component-client-keepalive-perl/current/CHANGES (original)
+++ branches/upstream/libpoe-component-client-keepalive-perl/current/CHANGES Wed Aug 12 16:09:10 2009
@@ -1,3 +1,40 @@
+==================================
+2009-07-28T06:12:42.236838Z v0_260
+==================================
+
+  2009-07-28 06:06:04 (r111) by rcaputo
+  Makefile.PL M; Client-Keepalive.pm M
+
+    Use latest POE, and prepare for a new release.
+
+  2009-07-27 04:55:14 (r110) by rcaputo
+  Makefile.PL M; Client-Keepalive.pm M
+
+    Added a machine-readable repository directory to the distribution.
+    Documented the bug tracker, repository, and other resource URLs. 
+
+  2009-07-27 02:39:01 (r109) by rcaputo; Makefile.PL M
+
+    Set license and repository metadata.
+
+  2009-07-26 18:04:17 (r108) by rcaputo; Client-Keepalive.pm M
+
+    Avoid calling setsockopt() on bad file descriptors. Sometimes a
+    socket is given back to POE::Component::Client::Keepalive, and then
+    it goes bad before it can be reclaimed or discarded. 
+
+  2009-07-26 07:09:17 (r107) by rcaputo; Makefile.PL M
+
+    Set the Net::IP dependency, even though POE::Component::Client::DNS
+    should pull it in via Net::DNS.
+
+  2009-07-26 07:08:00 (r106) by rcaputo; Client-Keepalive.pm M
+
+    Resolve rt.cpan.org 41326, reported by J.G.Konrad and entered into
+    the queue by Chris Williams. Dotted quad detection was pretty weak,
+    but now it uses Net::IP::ip_is_ipv4() to detect whether DNS
+    resolution is needed. 
+
 =================================
 2008-12-09T06:15:39.900728Z v0_25
 =================================
@@ -81,42 +118,6 @@
     Reverse the sense of the dotted-quad address test. Resolves
     rt.cpan.org ticket 38219, reported by Apocalypse. 
 
-=================================
-2008-07-13T06:50:02.417909Z v0_20
-=================================
-
-  2008-07-13 06:47:46 (r86) by rcaputo; Client-Keepalive.pm M
-
-    Time for a new release.
-
-  2008-07-13 06:23:06 (r85) by rcaputo; Client-Keepalive.pm M
-
-    Improve handling of canceled requests. Avoids DNS response errors and
-    the dreaded "unexpectedly undefined requests" crash. Fix prompted by
-    a test case from Jeff Bisbee. 
-
-===================================
-2008-03-24T16:40:25.441638Z v0_1001
-===================================
-
-  2008-03-24 16:37:59 (r83) by rcaputo; Client-Keepalive.pm M
-
-    Release 0.1001
-
-  2008-03-24 16:37:27 (r82) by rcaputo; Client-Keepalive.pm M
-
-    Resolve an issue where this component's session could shut down
-    before the object. Thanks to Kevin Scaldeferri for reporting the
-    problem in rt.cpan.org ticket 27182. 
-
-  2008-03-24 05:50:40 (r81) by rcaputo
-  t/51_reiss_reuse.t M; t/08_quick_reuse.t M
-
-    Randomize the ports used by test 08 and 51. Not a perfect solution,
-    but it should avoid most bind errors on systems that don't allow
-    immeditate port reuse. Works around the issue in rt.cpan.org 29097,
-    reported by Andreas J. König. (Wish me luck on the Unicode there.) 
-
 ==============
 End of Excerpt
 ==============

Modified: branches/upstream/libpoe-component-client-keepalive-perl/current/Client-Keepalive.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-client-keepalive-perl/current/Client-Keepalive.pm?rev=41727&op=diff
==============================================================================
--- branches/upstream/libpoe-component-client-keepalive-perl/current/Client-Keepalive.pm (original)
+++ branches/upstream/libpoe-component-client-keepalive-perl/current/Client-Keepalive.pm Wed Aug 12 16:09:10 2009
@@ -1,4 +1,4 @@
-# $Id: Client-Keepalive.pm 104 2008-12-09 06:14:33Z rcaputo $
+# $Id: Client-Keepalive.pm 111 2009-07-28 06:06:04Z rcaputo $
 
 package POE::Component::Client::Keepalive;
 
@@ -6,16 +6,17 @@
 use strict;
 
 use vars qw($VERSION);
-$VERSION = "0.25";
+$VERSION = "0.260";
 
 use Carp qw(croak);
-use Errno qw(ETIMEDOUT);
+use Errno qw(ETIMEDOUT EBADF);
 use Socket qw(SOL_SOCKET SO_LINGER);
 
 use POE;
 use POE::Wheel::SocketFactory;
 use POE::Component::Connection::Keepalive;
 use POE::Component::Client::DNS;
+use Net::IP qw(ip_is_ipv4);
 
 my $ssl_available;
 eval {
@@ -279,6 +280,7 @@
     # Move the wheel and its request into SF_WHEELS.
     DEBUG and warn "WAKEUP: creating wheel for $req_key";
 
+    # TODO - Set the SocketDomain to AF_INET6 if $addr =~ /:/?
     my $addr = ($request->[RQ_IP] or $request->[RQ_ADDRESS]);
     my $wheel = POE::Wheel::SocketFactory->new(
       BindAddress   => $self->[SF_BIND_ADDR],
@@ -716,15 +718,18 @@
   if ($socket_is_active) {
     DEBUG and warn "RECLAIM: socket is still active; trying to drain";
     use bytes;
+
     my $socket_had_data = sysread($socket, my $buf = "", 65536) || 0;
     DEBUG and warn "RECLAIM: socket had $socket_had_data bytes. 0 means EOF";
     DEBUG and warn "RECLAIM: Giving up on socket.";
 
-    # Avoid common FIN_WAIT_2 issues.
+    # Avoid common FIN_WAIT_2 issues, but only for valid sockets.
+    #if ($socket_had_data and fileno($socket)) {
     if ($socket_had_data) {
-      setsockopt($socket, SOL_SOCKET, SO_LINGER, pack("sll",1,0,0)) or die(
-        "setsockopt: $!"
+      my $opt_result = setsockopt(
+        $socket, SOL_SOCKET, SO_LINGER, pack("sll",1,0,0)
       );
+      die "setsockopt: " . ($!+0) . " $!" if (not $opt_result and $!  != EBADF);
     }
 
     goto &_ka_wake_up;
@@ -872,8 +877,11 @@
   my $host = $request->[RQ_ADDRESS];
 
   # Skip DNS resolution if it's already a dotted quad.
-  # TODO - Not all dotted quads are good.
-  if ($host =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) {
+  # ip_is_ipv4() doesn't require quads, so we count the dots.
+  #
+  # TODO - Do the same for IPv6 addresses containing colons?
+  # TODO - Would require AF_INET6 support around the SocketFactory.
+  if ((($host =~ tr[.][.]) == 3) and ip_is_ipv4($host)) {
     DEBUG_DNS and warn "DNS: $host is a dotted quad; skipping lookup";
     $kernel->call("$self", ka_add_to_queue => $request);
     return;
@@ -1341,15 +1349,9 @@
 L<POE>
 L<POE::Component::Connection::Keepalive>
 
-=head1 BUGS
-
-http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-Client-Keepalive
-tracks the known issues with this component.  You can add to them by
-sending mail to bug-poe-component-client-keepalive at rt.cpan.org.
-
 =head1 LICENSE
 
-This distribution is copyright 2004-2006 by Rocco Caputo.  All rights
+This distribution is copyright 2004-2009 by Rocco Caputo.  All rights
 are reserved.  This distribution is free software; you may
 redistribute it and/or modify it under the same terms as Perl itself.
 
@@ -1364,4 +1366,16 @@
 Joel Bernstein solved some nasty race conditions.  Portugal Telecom
 L<http://www.sapo.pt/> was kind enough to support his contributions.
 
+=head1 BUG TRACKER
+
+https://rt.cpan.org/Dist/Display.html?Status=Active&Queue=POE-Component-Client-Keepalive
+
+=head1 REPOSITORY
+
+http://thirdlobe.com/svn/poco-client-keepalive/
+
+=head1 OTHER RESOURCES
+
+http://search.cpan.org/dist/POE-Component-Client-Keepalive/
+
 =cut

Modified: branches/upstream/libpoe-component-client-keepalive-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-client-keepalive-perl/current/META.yml?rev=41727&op=diff
==============================================================================
--- branches/upstream/libpoe-component-client-keepalive-perl/current/META.yml (original)
+++ branches/upstream/libpoe-component-client-keepalive-perl/current/META.yml Wed Aug 12 16:09:10 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               POE-Component-Client-Keepalive
-version:            0.25
+version:            0.260
 abstract:           Manages and keeps alive client connections
 author:
     - Rocco Caputo <rcaputo at cpan.org>
@@ -8,15 +8,21 @@
 distribution_type:  module
 configure_requires:
     ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
 requires:
-    POE:                  0.31
-    POE::Component::Client::DNS:  1.01
+    Net::IP:              1.25
+    POE:                  1.007
+    POE::Component::Client::DNS:  1.04
+resources:
+    license:     http://dev.perl.org/licenses/
+    repository:  http://thirdlobe.com/svn/poco-client-http/trunk
 no_index:
     directory:
         - t
         - inc
         - mylib
-generated_by:       ExtUtils::MakeMaker version 6.48
+generated_by:       ExtUtils::MakeMaker version 6.54
 meta-spec:
     url:      http://module-build.sourceforge.net/META-spec-v1.4.html
     version:  1.4

Modified: branches/upstream/libpoe-component-client-keepalive-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-client-keepalive-perl/current/Makefile.PL?rev=41727&op=diff
==============================================================================
--- branches/upstream/libpoe-component-client-keepalive-perl/current/Makefile.PL (original)
+++ branches/upstream/libpoe-component-client-keepalive-perl/current/Makefile.PL Wed Aug 12 16:09:10 2009
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# $Id: Makefile.PL 102 2008-12-08 18:07:54Z rcaputo $
+# $Id: Makefile.PL 111 2009-07-28 06:06:04Z rcaputo $
 
 use strict;
 
@@ -31,8 +31,15 @@
     'Conn-Keepalive.pm'   => '$(INST_LIBDIR)/../Connection/Keepalive.pm',
   },
   PREREQ_PM    => {
-    'POE'                         => 0.31,
-    'POE::Component::Client::DNS' => 1.01,
+    'POE'                         => 1.007,
+    'POE::Component::Client::DNS' => 1.04,
+    'Net::IP'                     => 1.25,
+  },
+  META_ADD     => {
+    resources  => {
+      license    => 'http://dev.perl.org/licenses/',
+      repository => 'http://thirdlobe.com/svn/poco-client-http/trunk'
+    },
   },
   dist         => {
     COMPRESS   => 'gzip -9f',




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