Subject: | ->socketpair has moved in IO::Async 0.56 |
As suggested, using IO::Async::OS->socketpair instead works fine. With the attached path all tests pass cleanly, and this is only in tests, nothing in the main code uses ->socketpair directly.
cheers,
Tom
Subject: | io-async-os-socketpair.patch |
=== modified file 't/10irc-basic.t'
--- t/10irc-basic.t 2012-11-16 21:38:22 +0000
+++ t/10irc-basic.t 2013-04-14 23:11:34 +0000
@@ -14,7 +14,7 @@
my $loop = IO::Async::Loop->new();
testing_loop( $loop );
-my ( $S1, $S2 ) = $loop->socketpair() or die "Cannot create socket pair - $!";
+my ( $S1, $S2 ) = IO::Async::OS->socketpair() or die "Cannot create socket pair - $!";
my @messages;
=== modified file 't/11irc-pingpong.t'
--- t/11irc-pingpong.t 2010-12-29 20:29:23 +0000
+++ t/11irc-pingpong.t 2013-04-14 23:11:48 +0000
@@ -17,7 +17,7 @@
my $loop = IO::Async::Loop->new();
testing_loop( $loop );
-my ( $S1, $S2 ) = $loop->socketpair() or die "Cannot create socket pair - $!";
+my ( $S1, $S2 ) = IO::Async::OS->socketpair() or die "Cannot create socket pair - $!";
my $lag;
my $pingout;
=== modified file 't/13irc-hints.t'
--- t/13irc-hints.t 2012-11-16 21:38:22 +0000
+++ t/13irc-hints.t 2013-04-14 23:12:12 +0000
@@ -14,7 +14,7 @@
my $loop = IO::Async::Loop->new();
testing_loop( $loop );
-my ( $S1, $S2 ) = $loop->socketpair() or die "Cannot create socket pair - $!";
+my ( $S1, $S2 ) = IO::Async::OS->socketpair() or die "Cannot create socket pair - $!";
my @messages;
=== modified file 't/14irc-text.t'
--- t/14irc-text.t 2010-12-29 20:29:23 +0000
+++ t/14irc-text.t 2013-04-14 23:11:42 +0000
@@ -14,7 +14,7 @@
my $loop = IO::Async::Loop->new();
testing_loop( $loop );
-my ( $S1, $S2 ) = $loop->socketpair() or die "Cannot create socket pair - $!";
+my ( $S1, $S2 ) = IO::Async::OS->socketpair() or die "Cannot create socket pair - $!";
# We don't care what order we get these messages in, and we know we'll only
# get one of each type at once. Hash them
=== modified file 't/15irc-encodings.t'
--- t/15irc-encodings.t 2010-12-29 20:29:23 +0000
+++ t/15irc-encodings.t 2013-04-14 23:10:17 +0000
@@ -16,7 +16,7 @@
my $loop = IO::Async::Loop->new();
testing_loop( $loop );
-my ( $S1, $S2 ) = $loop->socketpair() or die "Cannot create socket pair - $!";
+my ( $S1, $S2 ) = IO::Async::OS->socketpair() or die "Cannot create socket pair - $!";
my @textmessages;
=== modified file 't/21client-chanmodes.t'
--- t/21client-chanmodes.t 2010-12-29 20:29:23 +0000
+++ t/21client-chanmodes.t 2013-04-14 23:11:54 +0000
@@ -14,7 +14,7 @@
my $loop = IO::Async::Loop->new();
testing_loop( $loop );
-my ( $S1, $S2 ) = $loop->socketpair() or die "Cannot create socket pair - $!";
+my ( $S1, $S2 ) = IO::Async::OS->socketpair() or die "Cannot create socket pair - $!";
my @messages;
=== modified file 't/22client-lists.t'
--- t/22client-lists.t 2010-12-29 20:29:23 +0000
+++ t/22client-lists.t 2013-04-14 23:12:00 +0000
@@ -14,7 +14,7 @@
my $loop = IO::Async::Loop->new();
testing_loop( $loop );
-my ( $S1, $S2 ) = $loop->socketpair() or die "Cannot create socket pair - $!";
+my ( $S1, $S2 ) = IO::Async::OS->socketpair() or die "Cannot create socket pair - $!";
my @messages;
=== modified file 't/23client-nick.t'
--- t/23client-nick.t 2010-12-29 20:29:23 +0000
+++ t/23client-nick.t 2013-04-14 23:12:16 +0000
@@ -15,7 +15,7 @@
my $loop = IO::Async::Loop->new();
testing_loop( $loop );
-my ( $S1, $S2 ) = $loop->socketpair() or die "Cannot create socket pair - $!";
+my ( $S1, $S2 ) = IO::Async::OS->socketpair() or die "Cannot create socket pair - $!";
my $irc = Net::Async::IRC->new(
transport => IO::Async::Stream->new( handle => $S1 ),