Subject: | 8th test in 01-connect.t fails for version 0.64 |
Date: | Mon, 25 Nov 2013 16:32:03 +0000 |
To: | "bug-Crypt-SSLeay [...] rt.cpan.org" <bug-crypt-ssleay [...] rt.cpan.org> |
From: | Manoj Kumar <mkmetw [...] hotmail.com> |
Hi,
I am trying to install Crypt::SSLeay on my Win XP 32-bit machine and the following test is failing -
# Failed test 'socket is now non-blocking'
# at t/01-connect.t line 64.
# got: ''
# expected: '0'
# Looks like you failed 1 test of 8.
t/01-connect.t ..
This failure is because of the following lines in subroutine blocking in IO::Socket version 1.32 -
my $orig= !${*$sock}{io_sock_nonblocking};
return $orig unless @_;
In the above code, if io_sock_nonblocking is non-zero, $orig will be empty string.
So, I have modified the test as follows (output of diff -u) -
--- t/01-connect.orig.t 2012-07-30 14:35:34.000000000 +0200
+++ t/01-connect.t 2013-11-25 17:16:52.861250000 +0100
@@ -61,5 +61,5 @@
is( $sock->blocking, 1, 'socket is blocking' );
$sock->blocking(0);
- is( $sock->blocking, 0, 'socket is now non-blocking' );
+ is( $sock->blocking, $^O eq 'MSWin32' ? '' : 0, 'socket is now non-blocking' );
}
Regards,