From 06f844648929e166afcdc5b73f8d9ca537dd742b Mon Sep 17 00:00:00 2001 From: Chris 'BinGOs' Williams Date: Mon, 10 Feb 2014 16:54:41 +0000 Subject: [PATCH] Update IO-Socket-IP to CPAN version 0.28 [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 | 2 +- cpan/IO-Socket-IP/Changes | 10 ++++++++++ cpan/IO-Socket-IP/META.json | 4 ++-- cpan/IO-Socket-IP/META.yml | 4 ++-- cpan/IO-Socket-IP/lib/IO/Socket/IP.pm | 7 ++++--- cpan/IO-Socket-IP/t/04local-client-v6.t | 1 + cpan/IO-Socket-IP/t/05local-server-v6.t | 1 + cpan/IO-Socket-IP/t/10args.t | 2 +- cpan/IO-Socket-IP/t/11sockopts.t | 9 +++++++-- pod/perldelta.pod | 2 +- 10 files changed, 30 insertions(+), 12 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 8a53e3e..9797fed 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -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/}, diff --git a/cpan/IO-Socket-IP/Changes b/cpan/IO-Socket-IP/Changes index 7f2624e..ef3f738 100644 --- a/cpan/IO-Socket-IP/Changes +++ b/cpan/IO-Socket-IP/Changes @@ -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 diff --git a/cpan/IO-Socket-IP/META.json b/cpan/IO-Socket-IP/META.json index 2bc1290..66b1744 100644 --- a/cpan/IO-Socket-IP/META.json +++ b/cpan/IO-Socket-IP/META.json @@ -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" } diff --git a/cpan/IO-Socket-IP/META.yml b/cpan/IO-Socket-IP/META.yml index 7aa66ba..9e8bb03 100644 --- a/cpan/IO-Socket-IP/META.yml +++ b/cpan/IO-Socket-IP/META.yml @@ -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 diff --git a/cpan/IO-Socket-IP/lib/IO/Socket/IP.pm b/cpan/IO-Socket-IP/lib/IO/Socket/IP.pm index 11ecf3b..44d057f 100644 --- a/cpan/IO-Socket-IP/lib/IO/Socket/IP.pm +++ b/cpan/IO-Socket-IP/lib/IO/Socket/IP.pm @@ -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 ) = @_; diff --git a/cpan/IO-Socket-IP/t/04local-client-v6.t b/cpan/IO-Socket-IP/t/04local-client-v6.t index 5c55367..ae265f9 100644 --- a/cpan/IO-Socket-IP/t/04local-client-v6.t +++ b/cpan/IO-Socket-IP/t/04local-client-v6.t @@ -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 diff --git a/cpan/IO-Socket-IP/t/05local-server-v6.t b/cpan/IO-Socket-IP/t/05local-server-v6.t index 2be2683..22ee59e 100644 --- a/cpan/IO-Socket-IP/t/05local-server-v6.t +++ b/cpan/IO-Socket-IP/t/05local-server-v6.t @@ -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 diff --git a/cpan/IO-Socket-IP/t/10args.t b/cpan/IO-Socket-IP/t/10args.t index ea02da0..8d46861 100644 --- a/cpan/IO-Socket-IP/t/10args.t +++ b/cpan/IO-Socket-IP/t/10args.t @@ -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]; }; diff --git a/cpan/IO-Socket-IP/t/11sockopts.t b/cpan/IO-Socket-IP/t/11sockopts.t index 40e74a2..90f92ae 100644 --- a/cpan/IO-Socket-IP/t/11sockopts.t +++ b/cpan/IO-Socket-IP/t/11sockopts.t @@ -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' ); } diff --git a/pod/perldelta.pod b/pod/perldelta.pod index d4bbf6c..e6f069d 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -276,7 +276,7 @@ Android support. =item * L, tentatively introduced in L, -has been upgraded from 0.26 to 0.27. +has been upgraded from 0.26 to 0.28. =item * -- 2.7.4