diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index bfe8f19744d3..ab89c9f47002 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -676,8 +676,8 @@ package Maintainers; }, 'IO::Socket::IP' => { - 'DISTRIBUTION' => 'PEVANS/IO-Socket-IP-0.42.tar.gz', - 'SYNCINFO' => 'jkeenan on Wed Aug 16 21:34:20 2023', + 'DISTRIBUTION' => 'PEVANS/IO-Socket-IP-0.43.tar.gz', + 'SYNCINFO' => 'tib on Wed Dec 4 17:32:19 2024', 'FILES' => q[cpan/IO-Socket-IP], 'EXCLUDED' => [ qr{^examples/}, diff --git a/cpan/IO-Socket-IP/lib/IO/Socket/IP.pm b/cpan/IO-Socket-IP/lib/IO/Socket/IP.pm index 3cdc17b96577..eb1d3b9d915c 100644 --- a/cpan/IO-Socket-IP/lib/IO/Socket/IP.pm +++ b/cpan/IO-Socket-IP/lib/IO/Socket/IP.pm @@ -1,9 +1,9 @@ # You may distribute under the terms of either the GNU General Public License # or the Artistic License (the same terms as Perl itself) # -# (C) Paul Evans, 2010-2023 -- leonerd@leonerd.org.uk +# (C) Paul Evans, 2010-2024 -- leonerd@leonerd.org.uk -package IO::Socket::IP 0.42; +package IO::Socket::IP 0.43; use v5.14; use warnings; @@ -64,6 +64,8 @@ C - Family-neutral IP socket supporting both IPv4 and IPv6 =head1 SYNOPSIS +=for highlighter language=perl + use IO::Socket::IP; my $sock = IO::Socket::IP->new( @@ -83,7 +85,7 @@ C - Family-neutral IP socket supporting both IPv4 and IPv6 This module provides a protocol-independent way to use IPv4 and IPv6 sockets, intended as a replacement for L. Most constructor arguments and methods are provided in a backward-compatible way. For a list of known -differences, see the C INCOMPATIBILITES section below. +differences, see the C INCOMPATIBILITIES section below. It uses the C function to convert hostnames and service names or port numbers into sets of possible addresses to connect to or listen on. @@ -313,7 +315,7 @@ two listening sockets, one bound to each protocol. =item MultiHomed This C-style argument is ignored, except if it is defined -but false. See the C INCOMPATIBILITES section below. +but false. See the C INCOMPATIBILITIES section below. However, the behaviour it enables is always performed by C. @@ -348,7 +350,7 @@ recognised are ignored. If neither C nor any hosts or addresses are passed, nor any C<*AddrInfo>, then the constructor has no information on which to decide a -socket family to create. In this case, it performs a C call with +socket family to create. In this case, it performs a C call with the C flag, no host name, and a service name of C<"0">, and uses the family of the first returned result. @@ -827,7 +829,7 @@ sub _unpack_sockaddr =head2 sockhost_service - ( $host, $service ) = $sock->sockhost_service( $numeric ) + ( $host, $service ) = $sock->sockhost_service( $numeric ); Returns the hostname and service name of the local address (that is, the socket address given by the C method). @@ -852,25 +854,25 @@ sub sockhost_service =head2 sockhost - $addr = $sock->sockhost + $addr = $sock->sockhost; Return the numeric form of the local address as a textual representation =head2 sockport - $port = $sock->sockport + $port = $sock->sockport; Return the numeric form of the local port number =head2 sockhostname - $host = $sock->sockhostname + $host = $sock->sockhostname; Return the resolved name of the local address =head2 sockservice - $service = $sock->sockservice + $service = $sock->sockservice; Return the resolved name of the local port number @@ -884,7 +886,7 @@ sub sockservice { my $self = shift; scalar +( $self->_get_host_service( $self-> =head2 sockaddr - $addr = $sock->sockaddr + $addr = $sock->sockaddr; Return the local address as a binary octet string @@ -894,7 +896,7 @@ sub sockaddr { my $self = shift; _unpack_sockaddr $self->sockname } =head2 peerhost_service - ( $host, $service ) = $sock->peerhost_service( $numeric ) + ( $host, $service ) = $sock->peerhost_service( $numeric ); Returns the hostname and service name of the peer address (that is, the socket address given by the C method), similar to the @@ -917,25 +919,25 @@ sub peerhost_service =head2 peerhost - $addr = $sock->peerhost + $addr = $sock->peerhost; Return the numeric form of the peer address as a textual representation =head2 peerport - $port = $sock->peerport + $port = $sock->peerport; Return the numeric form of the peer port number =head2 peerhostname - $host = $sock->peerhostname + $host = $sock->peerhostname; Return the resolved name of the peer address =head2 peerservice - $service = $sock->peerservice + $service = $sock->peerservice; Return the resolved name of the peer port number @@ -949,7 +951,7 @@ sub peerservice { my $self = shift; scalar +( $self->_get_host_service( $self-> =head2 peeraddr - $addr = $peer->peeraddr + $addr = $peer->peeraddr; Return the peer address as a binary octet string @@ -1001,7 +1003,7 @@ BEGIN { =head2 as_inet - $inet = $sock->as_inet + $inet = $sock->as_inet; Returns a new L instance wrapping the same filehandle. This may be useful in cases where it is required, for backward-compatibility, to @@ -1060,7 +1062,7 @@ called in a child process. use IO::Socket::IP; use Errno qw( EINPROGRESS EWOULDBLOCK ); - my @peeraddrinfo = ... # Caller must obtain the getaddinfo result here + my @peeraddrinfo = ... # Caller must obtain the getaddrinfo result here my $socket = IO::Socket::IP->new( PeerAddrInfo => \@peeraddrinfo, @@ -1103,10 +1105,14 @@ of the following special forms then special parsing is applied. The value of the C<...Host> argument will be split to give both the hostname and port (or service name): +=for highlighter + hostname.example.org:http # Host name 192.0.2.1:80 # IPv4 address [2001:db8::1]:80 # IPv6 address +=for highlighter language=perl + In each case, the port or service name (e.g. C<80>) is passed as the C or C argument. @@ -1132,16 +1138,16 @@ Returns a 2-element list, containing either the split hostname and port description if it could be parsed, or the given address and C if it was not recognised. - IO::Socket::IP->split_addr( "hostname:http" ) + IO::Socket::IP->split_addr( "hostname:http" ); # ( "hostname", "http" ) - IO::Socket::IP->split_addr( "192.0.2.1:80" ) + IO::Socket::IP->split_addr( "192.0.2.1:80" ); # ( "192.0.2.1", "80" ) - IO::Socket::IP->split_addr( "[2001:db8::1]:80" ) + IO::Socket::IP->split_addr( "[2001:db8::1]:80" ); # ( "2001:db8::1", "80" ) - IO::Socket::IP->split_addr( "something.else" ) + IO::Socket::IP->split_addr( "something.else" ); # ( "something.else", undef ) =cut @@ -1219,7 +1225,7 @@ sub configure $self->configure( { %$arg, Family => Socket::AF_INET6() } ); } -=head1 C INCOMPATIBILITES +=head1 C INCOMPATIBILITIES =over 4 diff --git a/cpan/IO-Socket-IP/t/00use.t b/cpan/IO-Socket-IP/t/00use.t index fdd4d61f9790..95269cf60484 100644 --- a/cpan/IO-Socket-IP/t/00use.t +++ b/cpan/IO-Socket-IP/t/00use.t @@ -3,8 +3,9 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; -use_ok( "IO::Socket::IP" ); +require IO::Socket::IP; +pass( 'Modules loaded' ); done_testing; diff --git a/cpan/IO-Socket-IP/t/01local-client-v4.t b/cpan/IO-Socket-IP/t/01local-client-v4.t index f1176651de07..a2d827181e3b 100644 --- a/cpan/IO-Socket-IP/t/01local-client-v4.t +++ b/cpan/IO-Socket-IP/t/01local-client-v4.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; @@ -52,13 +52,13 @@ foreach my $socktype (qw( SOCK_STREAM SOCK_DGRAM )) { ok( $socket->connected, "\$socket is connected for $socktype" ); ok( $socket->blocking, "\$socket is in blocking mode after connect for $socktype" ); - is_deeply( [ unpack_sockaddr_in $socket->sockname ], - [ unpack_sockaddr_in $testclient->peername ], - "\$socket->sockname for $socktype" ); + is( [ unpack_sockaddr_in $socket->sockname ], + [ unpack_sockaddr_in $testclient->peername ], + "\$socket->sockname for $socktype" ); - is_deeply( [ unpack_sockaddr_in $socket->peername ], - [ unpack_sockaddr_in $testclient->sockname ], - "\$socket->peername for $socktype" ); + is( [ unpack_sockaddr_in $socket->peername ], + [ unpack_sockaddr_in $testclient->sockname ], + "\$socket->peername for $socktype" ); is( $socket->peerhost, $INADDR_LOOPBACK_HOST, "\$socket->peerhost for $socktype" ); is( $socket->peerport, $testserver->sockport, "\$socket->peerport for $socktype" ); diff --git a/cpan/IO-Socket-IP/t/02local-server-v4.t b/cpan/IO-Socket-IP/t/02local-server-v4.t index 9bf74ed7d3a4..99c06a56eced 100644 --- a/cpan/IO-Socket-IP/t/02local-server-v4.t +++ b/cpan/IO-Socket-IP/t/02local-server-v4.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; @@ -43,8 +43,8 @@ foreach my $socktype (qw( SOCK_STREAM SOCK_DGRAM )) { ok( eval { $testserver->peerport; 1 }, "\$testserver->peerport does not die for $socktype" ) or do { chomp( my $e = $@ ); diag( "Exception was: $e" ) }; - is_deeply( { host => $testserver->peerhost, port => $testserver->peerport }, - { host => undef, port => undef }, + is( { host => $testserver->peerhost, port => $testserver->peerport }, + { host => undef, port => undef }, 'peerhost/peersock yield scalar' ); my $socket = IO::Socket::INET->new( @@ -59,18 +59,18 @@ foreach my $socktype (qw( SOCK_STREAM SOCK_DGRAM )) { do { $testserver->connect( $socket->sockname ); $testserver }; ok( defined $testclient, "accepted test $socktype client" ); - isa_ok( $testclient, "IO::Socket::IP", "\$testclient for $socktype" ); + isa_ok( $testclient, [ "IO::Socket::IP" ], "\$testclient for $socktype" ); is( $testclient->sockdomain, AF_INET, "\$testclient->sockdomain for $socktype" ); is( $testclient->socktype, Socket->$socktype, "\$testclient->socktype for $socktype" ); - is_deeply( [ unpack_sockaddr_in $socket->sockname ], - [ unpack_sockaddr_in $testclient->peername ], - "\$socket->sockname for $socktype" ); + is( [ unpack_sockaddr_in $socket->sockname ], + [ unpack_sockaddr_in $testclient->peername ], + "\$socket->sockname for $socktype" ); - is_deeply( [ unpack_sockaddr_in $socket->peername ], - [ unpack_sockaddr_in $testclient->sockname ], - "\$socket->peername for $socktype" ); + is( [ unpack_sockaddr_in $socket->peername ], + [ unpack_sockaddr_in $testclient->sockname ], + "\$socket->peername for $socktype" ); is( $testclient->sockport, $socket->peerport, "\$testclient->sockport for $socktype" ); is( $testclient->peerport, $socket->sockport, "\$testclient->peerport for $socktype" ); diff --git a/cpan/IO-Socket-IP/t/03local-cross-v4.t b/cpan/IO-Socket-IP/t/03local-cross-v4.t index dca1c89833ba..df4b268f440e 100644 --- a/cpan/IO-Socket-IP/t/03local-cross-v4.t +++ b/cpan/IO-Socket-IP/t/03local-cross-v4.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; diff --git a/cpan/IO-Socket-IP/t/04local-client-v6.t b/cpan/IO-Socket-IP/t/04local-client-v6.t index 9073fae4836c..5c5aa05ea64c 100644 --- a/cpan/IO-Socket-IP/t/04local-client-v6.t +++ b/cpan/IO-Socket-IP/t/04local-client-v6.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; use Socket qw( inet_pton inet_ntop pack_sockaddr_in6 unpack_sockaddr_in6 IN6ADDR_LOOPBACK ); @@ -66,13 +66,13 @@ foreach my $socktype (qw( SOCK_STREAM SOCK_DGRAM )) { ok( $socket->connected, "\$socket is connected for $socktype" ); - is_deeply( [ unpack_sockaddr_in6_addrport( $socket->sockname ) ], - [ unpack_sockaddr_in6_addrport( $testclient->peername ) ], - "\$socket->sockname for $socktype" ); + is( [ unpack_sockaddr_in6_addrport( $socket->sockname ) ], + [ unpack_sockaddr_in6_addrport( $testclient->peername ) ], + "\$socket->sockname for $socktype" ); - is_deeply( [ unpack_sockaddr_in6_addrport( $socket->peername ) ], - [ unpack_sockaddr_in6_addrport( $testclient->sockname ) ], - "\$socket->peername for $socktype" ); + is( [ unpack_sockaddr_in6_addrport( $socket->peername ) ], + [ unpack_sockaddr_in6_addrport( $testclient->sockname ) ], + "\$socket->peername for $socktype" ); is( $socket->peerhost, $IN6ADDR_LOOPBACK_HOST, "\$socket->peerhost for $socktype" ); is( $socket->peerport, $testport, "\$socket->peerport for $socktype" ); diff --git a/cpan/IO-Socket-IP/t/05local-server-v6.t b/cpan/IO-Socket-IP/t/05local-server-v6.t index 05dd71ae517d..7be4020138e8 100644 --- a/cpan/IO-Socket-IP/t/05local-server-v6.t +++ b/cpan/IO-Socket-IP/t/05local-server-v6.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; use Socket qw( inet_pton inet_ntop pack_sockaddr_in6 unpack_sockaddr_in6 IN6ADDR_LOOPBACK ); @@ -64,18 +64,18 @@ foreach my $socktype (qw( SOCK_STREAM SOCK_DGRAM )) { do { $testserver->connect( $socket->sockname ); $testserver }; ok( defined $testclient, "accepted test $socktype client" ); - isa_ok( $testclient, "IO::Socket::IP", "\$testclient for $socktype" ); + isa_ok( $testclient, [ "IO::Socket::IP" ], "\$testclient for $socktype" ); is( $testclient->sockdomain, $AF_INET6, "\$testclient->sockdomain for $socktype" ); is( $testclient->socktype, Socket->$socktype, "\$testclient->socktype for $socktype" ); - is_deeply( [ unpack_sockaddr_in6_addrport( $socket->sockname ) ], - [ unpack_sockaddr_in6_addrport( $testclient->peername ) ], - "\$socket->sockname for $socktype" ); + is( [ unpack_sockaddr_in6_addrport( $socket->sockname ) ], + [ unpack_sockaddr_in6_addrport( $testclient->peername ) ], + "\$socket->sockname for $socktype" ); - is_deeply( [ unpack_sockaddr_in6_addrport( $socket->peername ) ], - [ unpack_sockaddr_in6_addrport( $testclient->sockname ) ], - "\$socket->peername for $socktype" ); + is( [ unpack_sockaddr_in6_addrport( $socket->peername ) ], + [ unpack_sockaddr_in6_addrport( $testclient->sockname ) ], + "\$socket->peername for $socktype" ); my $peerport = ( Socket::unpack_sockaddr_in6 $socket->peername )[0]; my $sockport = ( Socket::unpack_sockaddr_in6 $socket->sockname )[0]; diff --git a/cpan/IO-Socket-IP/t/06local-cross-v6.t b/cpan/IO-Socket-IP/t/06local-cross-v6.t index 7f63b6354264..5663d2311bda 100644 --- a/cpan/IO-Socket-IP/t/06local-cross-v6.t +++ b/cpan/IO-Socket-IP/t/06local-cross-v6.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; diff --git a/cpan/IO-Socket-IP/t/10args.t b/cpan/IO-Socket-IP/t/10args.t index 20ebf1af0798..b409d513e3ae 100644 --- a/cpan/IO-Socket-IP/t/10args.t +++ b/cpan/IO-Socket-IP/t/10args.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; @@ -29,7 +29,7 @@ sub arguments_is { $args; }; - is_deeply($got, $exp, $name); + is($got, $exp, $name); } my @tests = ( @@ -55,21 +55,21 @@ my @tests = ( [ [ PeerHost => '127.0.0.1:443', PeerPort => '80' ], { PeerHost => '127.0.0.1', PeerService => '443' } ], ); -is_deeply( [ IO::Socket::IP->split_addr( "hostname:http" ) ], - [ "hostname", "http" ], - "split_addr hostname:http" ); +is( [ IO::Socket::IP->split_addr( "hostname:http" ) ], + [ "hostname", "http" ], + "split_addr hostname:http" ); -is_deeply( [ IO::Socket::IP->split_addr( "192.0.2.1:80" ) ], - [ "192.0.2.1", "80" ], - "split_addr 192.0.2.1:80" ); +is( [ IO::Socket::IP->split_addr( "192.0.2.1:80" ) ], + [ "192.0.2.1", "80" ], + "split_addr 192.0.2.1:80" ); -is_deeply( [ IO::Socket::IP->split_addr( "[2001:db8::1]:80" ) ], - [ "2001:db8::1", "80" ], - "split_addr [2001:db8::1]:80" ); +is( [ IO::Socket::IP->split_addr( "[2001:db8::1]:80" ) ], + [ "2001:db8::1", "80" ], + "split_addr [2001:db8::1]:80" ); -is_deeply( [ IO::Socket::IP->split_addr( "something.else" ) ], - [ "something.else", undef ], - "split_addr something.else" ); +is( [ IO::Socket::IP->split_addr( "something.else" ) ], + [ "something.else", undef ], + "split_addr something.else" ); is( IO::Socket::IP->join_addr( "hostname", "http" ), "hostname:http", diff --git a/cpan/IO-Socket-IP/t/11sockopts.t b/cpan/IO-Socket-IP/t/11sockopts.t index e0bee29eb6c4..bea37c05bccb 100644 --- a/cpan/IO-Socket-IP/t/11sockopts.t +++ b/cpan/IO-Socket-IP/t/11sockopts.t @@ -3,15 +3,16 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; use Errno qw( EACCES ); use Socket qw( SOL_SOCKET SO_REUSEADDR SO_REUSEPORT SO_BROADCAST ); -TODO: { - local $TODO = "SO_REUSEADDR doesn't appear to work on cygwin smokers" if $^O eq "cygwin"; +{ + my $todo; + $todo = todo "SO_REUSEADDR doesn't appear to work on cygwin smokers" if $^O eq "cygwin"; # I honestly have no idea why this fails, and people don't seem to be able # to reproduce it on a development box. I'll mark it TODO for now until we # can gain any more insight into it. diff --git a/cpan/IO-Socket-IP/t/12port-fallback.t b/cpan/IO-Socket-IP/t/12port-fallback.t index 1f209f9f2651..1a92b5741cce 100644 --- a/cpan/IO-Socket-IP/t/12port-fallback.t +++ b/cpan/IO-Socket-IP/t/12port-fallback.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; use Socket 1.95 qw( @@ -36,11 +36,11 @@ no warnings 'redefine'; IO::Socket::IP->new( LocalPort => "zyxxyblarg(80)" ); -is_deeply( \@gai_args, - [ - [ undef, "zyxxyblarg", { flags => AI_PASSIVE|$AI_ADDRCONFIG, socktype => SOCK_STREAM, protocol => IPPROTO_TCP } ], - [ undef, "80", { flags => AI_PASSIVE|$AI_ADDRCONFIG, socktype => SOCK_STREAM, protocol => IPPROTO_TCP } ], - ], - '@gai_args for LocalPort => "zyxxyblarg(80)"' ); +is( \@gai_args, + [ + [ undef, "zyxxyblarg", { flags => AI_PASSIVE|$AI_ADDRCONFIG, socktype => SOCK_STREAM, protocol => IPPROTO_TCP } ], + [ undef, "80", { flags => AI_PASSIVE|$AI_ADDRCONFIG, socktype => SOCK_STREAM, protocol => IPPROTO_TCP } ], + ], + '@gai_args for LocalPort => "zyxxyblarg(80)"' ); done_testing; diff --git a/cpan/IO-Socket-IP/t/13addrinfo.t b/cpan/IO-Socket-IP/t/13addrinfo.t index e8368cb6e66c..a9bd38f56487 100644 --- a/cpan/IO-Socket-IP/t/13addrinfo.t +++ b/cpan/IO-Socket-IP/t/13addrinfo.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; @@ -27,9 +27,9 @@ use Socket qw( SOCK_STREAM unpack_sockaddr_in getaddrinfo ); ok( defined $socket, 'IO::Socket::IP->new( PeerAddrInfo => ... ) constructs a new socket' ) or diag( " error was $IO::Socket::errstr" ); - is_deeply( [ unpack_sockaddr_in $socket->peername ], - [ unpack_sockaddr_in $testserver->sockname ], - '$socket->peername' ); + is( [ unpack_sockaddr_in $socket->peername ], + [ unpack_sockaddr_in $testserver->sockname ], + '$socket->peername' ); } { @@ -49,9 +49,9 @@ use Socket qw( SOCK_STREAM unpack_sockaddr_in getaddrinfo ); PeerPort => $socket->sockport, ) or die "Cannot connect to localhost - $IO::Socket::errstr"; - is_deeply( [ unpack_sockaddr_in $socket->sockname ], - [ unpack_sockaddr_in $testclient->peername ], - '$socket->sockname' ); + is( [ unpack_sockaddr_in $socket->sockname ], + [ unpack_sockaddr_in $testclient->peername ], + '$socket->sockname' ); } done_testing; diff --git a/cpan/IO-Socket-IP/t/14fileno.t b/cpan/IO-Socket-IP/t/14fileno.t index edf041a4b43a..b417ea755c96 100644 --- a/cpan/IO-Socket-IP/t/14fileno.t +++ b/cpan/IO-Socket-IP/t/14fileno.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; use Socket qw( AF_INET SOCK_STREAM ); diff --git a/cpan/IO-Socket-IP/t/15io-socket.t b/cpan/IO-Socket-IP/t/15io-socket.t index 7cb913a08ea3..d06aa362ea86 100644 --- a/cpan/IO-Socket-IP/t/15io-socket.t +++ b/cpan/IO-Socket-IP/t/15io-socket.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket; use IO::Socket::IP -register; @@ -18,7 +18,7 @@ use IO::Socket::IP -register; GetAddrInfoFlags => 0, # disable AI_ADDRCONFIG ); - isa_ok( $sock, "IO::Socket::IP", 'IO::Socket->new( Domain => AF_INET )' ) or + isa_ok( $sock, [ "IO::Socket::IP" ], 'IO::Socket->new( Domain => AF_INET )' ) or diag( " error was $IO::Socket::errstr" ); $sock = IO::Socket->new( @@ -45,7 +45,7 @@ SKIP: { GetAddrInfoFlags => 0, # disable AI_ADDRCONFIG ); - isa_ok( $sock, "IO::Socket::IP", 'IO::Socket->new( Domain => AF_INET6 )' ) or + isa_ok( $sock, [ "IO::Socket::IP" ], 'IO::Socket->new( Domain => AF_INET6 )' ) or diag( " error was $IO::Socket::errstr" ); $sock = IO::Socket->new( diff --git a/cpan/IO-Socket-IP/t/16v6only.t b/cpan/IO-Socket-IP/t/16v6only.t index 19b027b133bb..0834b13b0c74 100644 --- a/cpan/IO-Socket-IP/t/16v6only.t +++ b/cpan/IO-Socket-IP/t/16v6only.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use Socket qw(PF_INET6 PF_INET IPPROTO_IPV6 IPV6_V6ONLY); use IO::Socket::IP; diff --git a/cpan/IO-Socket-IP/t/17gai-flags.t b/cpan/IO-Socket-IP/t/17gai-flags.t index d2ef6b3d6684..262076118976 100644 --- a/cpan/IO-Socket-IP/t/17gai-flags.t +++ b/cpan/IO-Socket-IP/t/17gai-flags.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; use Socket 1.95 qw( @@ -35,11 +35,11 @@ no warnings 'redefine'; ); IO::Socket::IP->new( LocalPort => "80" ); -is_deeply( \@gai_args, - [ - [ undef, "80", { flags => AI_PASSIVE|$AI_ADDRCONFIG, socktype => SOCK_STREAM, protocol => IPPROTO_TCP } ], - ], - '@gai_args for LocalPort => "80"' ); +is( \@gai_args, + [ + [ undef, "80", { flags => AI_PASSIVE|$AI_ADDRCONFIG, socktype => SOCK_STREAM, protocol => IPPROTO_TCP } ], + ], + '@gai_args for LocalPort => "80"' ); SKIP: { skip "No AI_NUMERICSERV", 1 unless defined eval { AI_NUMERICSERV() }; @@ -55,11 +55,11 @@ SKIP: { ); IO::Socket::IP->new( LocalPort => "80", GetAddrInfoFlags => AI_NUMERICSERV ); - is_deeply( \@gai_args, - [ - [ undef, "80", { flags => AI_PASSIVE|AI_NUMERICSERV, socktype => SOCK_STREAM, protocol => IPPROTO_TCP } ], - ], - '@gai_args for LocalPort => "80", GetAddrInfoFlags => AI_NUMERICSERV' ); + is( \@gai_args, + [ + [ undef, "80", { flags => AI_PASSIVE|AI_NUMERICSERV, socktype => SOCK_STREAM, protocol => IPPROTO_TCP } ], + ], + '@gai_args for LocalPort => "80", GetAddrInfoFlags => AI_NUMERICSERV' ); } done_testing; diff --git a/cpan/IO-Socket-IP/t/18fdopen.t b/cpan/IO-Socket-IP/t/18fdopen.t index 51efa1a5836c..0159011acf29 100644 --- a/cpan/IO-Socket-IP/t/18fdopen.t +++ b/cpan/IO-Socket-IP/t/18fdopen.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; use Socket qw( SOCK_STREAM ); diff --git a/cpan/IO-Socket-IP/t/19no-addrs.t b/cpan/IO-Socket-IP/t/19no-addrs.t index e9878c70fdd6..ed30516a4161 100644 --- a/cpan/IO-Socket-IP/t/19no-addrs.t +++ b/cpan/IO-Socket-IP/t/19no-addrs.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; use Socket qw( SOCK_STREAM AF_INET ); diff --git a/cpan/IO-Socket-IP/t/20subclass.t b/cpan/IO-Socket-IP/t/20subclass.t index a1e8dfeda5d5..91876aef4582 100644 --- a/cpan/IO-Socket-IP/t/20subclass.t +++ b/cpan/IO-Socket-IP/t/20subclass.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; diff --git a/cpan/IO-Socket-IP/t/21as-inet.t b/cpan/IO-Socket-IP/t/21as-inet.t index 9cd3b1b0f041..ec3705db6b45 100644 --- a/cpan/IO-Socket-IP/t/21as-inet.t +++ b/cpan/IO-Socket-IP/t/21as-inet.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; @@ -23,7 +23,7 @@ my $accepted = $server->accept my $inet_client = $client->as_inet; -isa_ok( $inet_client, "IO::Socket::INET", '->as_inet returns IO::Socket::INET' ); +isa_ok( $inet_client, [ "IO::Socket::INET" ], '->as_inet returns IO::Socket::INET' ); is( $inet_client->fileno, $client->fileno, '->as_inet socket wraps the same fileno' ); diff --git a/cpan/IO-Socket-IP/t/22timeout.t b/cpan/IO-Socket-IP/t/22timeout.t index 4cc3bff3e993..c2e0212834ae 100644 --- a/cpan/IO-Socket-IP/t/22timeout.t +++ b/cpan/IO-Socket-IP/t/22timeout.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; diff --git a/cpan/IO-Socket-IP/t/30nonblocking-connect.t b/cpan/IO-Socket-IP/t/30nonblocking-connect.t index 20bc9a7a67c0..a97d0e2f137a 100644 --- a/cpan/IO-Socket-IP/t/30nonblocking-connect.t +++ b/cpan/IO-Socket-IP/t/30nonblocking-connect.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; @@ -55,9 +55,9 @@ ok( !$!, 'Repeated ->connect eventually succeeds' ); is( $socket->sockdomain, AF_INET, '$socket->sockdomain' ); is( $socket->socktype, SOCK_STREAM, '$socket->socktype' ); -is_deeply( [ unpack_sockaddr_in $socket->peername ], - [ unpack_sockaddr_in $testserver->sockname ], - '$socket->peername' ); +is( [ unpack_sockaddr_in $socket->peername ], + [ unpack_sockaddr_in $testserver->sockname ], + '$socket->peername' ); is( $socket->peerhost, $INADDR_LOOPBACK_HOST, '$socket->peerhost' ); is( $socket->peerport, $testserver->sockport, '$socket->peerport' ); diff --git a/cpan/IO-Socket-IP/t/31nonblocking-connect-internet.t b/cpan/IO-Socket-IP/t/31nonblocking-connect-internet.t index 340ea8ceceae..e60f411359da 100644 --- a/cpan/IO-Socket-IP/t/31nonblocking-connect-internet.t +++ b/cpan/IO-Socket-IP/t/31nonblocking-connect-internet.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; use IO::Socket::IP; diff --git a/cpan/IO-Socket-IP/t/99pod.t b/cpan/IO-Socket-IP/t/99pod.t index d1972ce38bba..c70eec21d711 100644 --- a/cpan/IO-Socket-IP/t/99pod.t +++ b/cpan/IO-Socket-IP/t/99pod.t @@ -3,7 +3,7 @@ use v5.14; use warnings; -use Test::More; +use Test2::V0; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;