},
'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/},
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
"provides" : {
"IO::Socket::IP" : {
"file" : "lib/IO/Socket/IP.pm",
- "version" : "0.27"
+ "version" : "0.28"
}
},
"release_status" : "stable",
"http://dev.perl.org/licenses/"
]
},
- "version" : "0.27"
+ "version" : "0.28"
}
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
# $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;
}
}
- $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 ) = @_;
PeerHost => "::1",
PeerService => $testport,
Type => Socket->$socktype,
+ GetAddrInfoFlags => 0, # disable AI_ADDRCONFIG
);
ok( defined $socket, "IO::Socket::IP->new constructs a $socktype socket" ) or
( $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
no warnings 'redefine';
my $args;
- local *IO::Socket::IP::_configure = sub {
+ local *IO::Socket::IP::_io_socket_ip__configure = sub {
$args = $_[1];
return $_[0];
};
use IO::Socket::IP;
+use Errno qw( EACCES );
use Socket qw( SOL_SOCKET SO_REUSEADDR SO_REUSEPORT SO_BROADCAST );
TODO: {
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' );
}
=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 *