This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade IO-Socket-IP from version 0.30 to 0.31
authorSteve Hay <steve.m.hay@googlemail.com>
Fri, 11 Jul 2014 07:51:42 +0000 (08:51 +0100)
committerSteve Hay <steve.m.hay@googlemail.com>
Fri, 11 Jul 2014 07:51:42 +0000 (08:51 +0100)
(perldelta: Say we're upgrading from 0.29 since we've already upgraded from
that since 5.21.0.)

Porting/Maintainers.pl
cpan/IO-Socket-IP/lib/IO/Socket/IP.pm
pod/perldelta.pod

index 32100a0..fe8b6cd 100755 (executable)
@@ -622,7 +622,7 @@ use File::Glob qw(:case);
     },
 
     'IO::Socket::IP' => {
-        'DISTRIBUTION' => 'PEVANS/IO-Socket-IP-0.30.tar.gz',
+        'DISTRIBUTION' => 'PEVANS/IO-Socket-IP-0.31.tar.gz',
         'FILES'        => q[cpan/IO-Socket-IP],
         'EXCLUDED'     => [
             qr{^examples/},
index 1911145..af783f2 100644 (file)
@@ -7,7 +7,7 @@ package IO::Socket::IP;
 # $VERSION needs to be set before  use base 'IO::Socket'
 #  - https://rt.cpan.org/Ticket/Display.html?id=92107
 BEGIN {
-   $VERSION = '0.30';
+   $VERSION = '0.31';
 }
 
 use strict;
@@ -601,7 +601,7 @@ sub setup
       }
 
       if( defined( my $addr = $info->{peeraddr} ) ) {
-         if( $self->IO::Socket::IP::connect( $addr ) ) {
+         if( $self->connect( $addr ) ) {
             $! = 0;
             return 1;
          }
@@ -611,6 +611,13 @@ sub setup
             return 0;
          }
 
+        # If connect failed but we have no system error there must be an error
+        # at the application layer, like a bad certificate with
+        # IO::Socket::SSL.
+        # In this case don't continue IP based multi-homing because the problem
+        # cannot be solved at the IP layer.
+        return 0 if ! $!;
+
          ${*$self}{io_socket_ip_errors}[0] = $!;
          next;
       }
@@ -651,7 +658,7 @@ sub connect
    # (still in progress). This even works on MSWin32.
    my $addr = ${*$self}{io_socket_ip_infos}[${*$self}{io_socket_ip_idx}]{peeraddr};
 
-   if( $self->IO::Socket::IP::connect( $addr ) or $! == EISCONN ) {
+   if( CORE::connect( $self, $addr ) or $! == EISCONN ) {
       delete ${*$self}{io_socket_ip_connect_in_progress};
       $! = 0;
       return 1;
index 854ec68..83d1096 100644 (file)
@@ -129,6 +129,14 @@ XXX
 
 =item *
 
+L<IO::Socket::IP> has been upgraded from verion 0.29 to 0.31.
+
+A better fix for subclassing C<connect()>.
+L<[cpan #95983]|https://rt.cpan.org/Ticket/Display.html?id=95983>
+L<[cpan #97050]|https://rt.cpan.org/Ticket/Display.html?id=97050>
+
+=item *
+
 L<Math::BigInt> has been upgraded from version 1.9995 to 1.9996.
 
 Correct handling of subclasses.