Update IO-Socket-IP to CPAN version 0.28
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Mon, 10 Feb 2014 16:54:41 +0000 (16:54 +0000)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Mon, 10 Feb 2014 16:56:02 +0000 (16:56 +0000)
  [DELTA]

0.28    2014/02/10 16:17:59
        [CHANGES]
         * Renamed internal _configure method to _io_socket_ip__configure to
           avoid clashes with modules that try to subclass IO::Socket::INET

        [BUGFIXES]
         * Disable AI_ADDRCONFIG during one-sided 'v6 tests as sometimes it
           would otherwise fail
         * Skip the SO_BROADCAST test on OSes that fail with EACCES (RT92502)

Porting/Maintainers.pl
cpan/IO-Socket-IP/Changes
cpan/IO-Socket-IP/META.json
cpan/IO-Socket-IP/META.yml
cpan/IO-Socket-IP/lib/IO/Socket/IP.pm
cpan/IO-Socket-IP/t/04local-client-v6.t
cpan/IO-Socket-IP/t/05local-server-v6.t
cpan/IO-Socket-IP/t/10args.t
cpan/IO-Socket-IP/t/11sockopts.t
pod/perldelta.pod

index 8a53e3e..9797fed 100755 (executable)
@@ -634,7 +634,7 @@ use File::Glob qw(:case);
     },
 
     'IO::Socket::IP' => {
-        'DISTRIBUTION' => 'PEVANS/IO-Socket-IP-0.27.tar.gz',
+        'DISTRIBUTION' => 'PEVANS/IO-Socket-IP-0.28.tar.gz',
         'FILES'        => q[cpan/IO-Socket-IP],
         'EXCLUDED'     => [
             qr{^examples/},
index 7f2624e..ef3f738 100644 (file)
@@ -1,5 +1,15 @@
 Revision history for IO-Socket-IP
 
+0.28    2014/02/10 16:17:59
+        [CHANGES]
+         * Renamed internal _configure method to _io_socket_ip__configure to
+           avoid clashes with modules that try to subclass IO::Socket::INET
+
+        [BUGFIXES]
+         * Disable AI_ADDRCONFIG during one-sided 'v6 tests as sometimes it
+           would otherwise fail
+         * Skip the SO_BROADCAST test on OSes that fail with EACCES (RT92502)
+
 0.27    2014/01/20 18:08:31
         [BUGFIXES]
          * Apply a short timeout to unit tests that probe for internet
index 2bc1290..66b1744 100644 (file)
@@ -29,7 +29,7 @@
    "provides" : {
       "IO::Socket::IP" : {
          "file" : "lib/IO/Socket/IP.pm",
-         "version" : "0.27"
+         "version" : "0.28"
       }
    },
    "release_status" : "stable",
@@ -38,5 +38,5 @@
          "http://dev.perl.org/licenses/"
       ]
    },
-   "version" : "0.27"
+   "version" : "0.28"
 }
index 7aa66ba..9e8bb03 100644 (file)
@@ -14,10 +14,10 @@ name: IO-Socket-IP
 provides:
   IO::Socket::IP:
     file: lib/IO/Socket/IP.pm
-    version: 0.27
+    version: 0.28
 requires:
   IO::Socket: 0
   Socket: 1.97
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.27
+version: 0.28
index 11ecf3b..44d057f 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.27';
+   $VERSION = '0.28';
 }
 
 use strict;
@@ -364,10 +364,11 @@ sub configure
       }
    }
 
-   $self->_configure( $arg );
+   $self->_io_socket_ip__configure( $arg );
 }
 
-sub _configure
+# Avoid simply calling it _configure, as some subclasses of IO::Socket::INET on CPAN already take that
+sub _io_socket_ip__configure
 {
    my $self = shift;
    my ( $arg ) = @_;
index 5c55367..ae265f9 100644 (file)
@@ -49,6 +49,7 @@ foreach my $socktype (qw( SOCK_STREAM SOCK_DGRAM )) {
       PeerHost    => "::1",
       PeerService => $testport,
       Type        => Socket->$socktype,
+      GetAddrInfoFlags => 0, # disable AI_ADDRCONFIG
    );
 
    ok( defined $socket, "IO::Socket::IP->new constructs a $socktype socket" ) or
index 2be2683..22ee59e 100644 (file)
@@ -34,6 +34,7 @@ foreach my $socktype (qw( SOCK_STREAM SOCK_DGRAM )) {
       ( $socktype eq "SOCK_STREAM" ? ( Listen => 1 ) : () ),
       LocalHost => "::1",
       Type      => Socket->$socktype,
+      GetAddrInfoFlags => 0, # disable AI_ADDRCONFIG
    );
 
    ok( defined $testserver, "IO::Socket::IP->new constructs a $socktype socket" ) or
index ea02da0..8d46861 100644 (file)
@@ -19,7 +19,7 @@ sub arguments_is {
       no warnings 'redefine';
       my $args;
 
-      local *IO::Socket::IP::_configure = sub {
+      local *IO::Socket::IP::_io_socket_ip__configure = sub {
          $args = $_[1];
          return $_[0];
       };
index 40e74a2..90f92ae 100644 (file)
@@ -7,6 +7,7 @@ use Test::More;
 
 use IO::Socket::IP;
 
+use Errno qw( EACCES );
 use Socket qw( SOL_SOCKET SO_REUSEADDR SO_REUSEPORT SO_BROADCAST );
 
 TODO: {
@@ -43,12 +44,16 @@ SKIP: {
    ok( $sock->getsockopt( SOL_SOCKET, SO_REUSEPORT ), 'SO_REUSEPORT set' );
 }
 
-{
+SKIP: {
+   # Some OSes need special privileges to set SO_BROADCAST
+   $! = 0;
    my $sock = IO::Socket::IP->new(
       LocalHost => "127.0.0.1",
       Type      => SOCK_DGRAM,
       Broadcast => 1,
-   ) or die "Cannot socket() - $@";
+   );
+   skip "Privileges required to set broadcast on datagram socket", 1 if !$sock and $! == EACCES;
+   die "Cannot socket() - $@" unless $sock;
 
    ok( $sock->getsockopt( SOL_SOCKET, SO_BROADCAST ), 'SO_BROADCAST set' );
 }
index d4bbf6c..e6f069d 100644 (file)
@@ -276,7 +276,7 @@ Android support.
 =item *
 
 L<IO::Socket::IP>, tentatively introduced in L<Perl 5.19.8|perl5198delta>,
-has been upgraded from 0.26 to 0.27.
+has been upgraded from 0.26 to 0.28.
 
 =item *