Skip Menu |
 

This queue is for tickets about the IO-Socket-IP CPAN distribution.

Report information
The Basics
Id: 98285
Status: open
Priority: 0/
Queue: IO-Socket-IP

People
Owner: Nobody in particular
Requestors: JHI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: AIX failure in t/31nonblocking.t
./perl -Ilib cpan/IO-Socket-IP/t/31nonblocking.t ok 1 - defined $socket for cpanidx.org:80 ok 2 - $socket has fileno ok 3 - $socket not yet connected Argument "\0\0\0\0\0\0\0.?\0\n^B1?^B8??????\\??^I?4^H^F\0^A^H\0^F^D..." isn't numeric in scalar assignment at lib/IO/Socket/IP.pm line 651. ok 4 - ->connect eventually succeeds ok 5 - $socket now connected ok 6 # skip Connecting to cpanidx.org:6666 doesn't give ECONNREFUSED ok 7 # skip Connecting to cpanidx.org:6666 doesn't give ECONNREFUSED ok 8 # skip Connecting to cpanidx.org:6666 doesn't give ECONNREFUSED ok 9 # skip Connecting to cpanidx.org:6666 doesn't give ECONNREFUSED 1..9 AIX 6.1, FWIW. Looking at line 651: 649 if( my $errno = $self->getsockopt( SOL_SOCKET, SO_ERROR ) ) { 650 delete ${*$self}{io_socket_ip_connect_in_progress}; 651 ${*$self}{io_socket_ip_errors}[0] = $! = $errno; 652 return $self->setup; 653 } I'm not familiar with the code... but at least the plain getsockopt() returns a packed binary string (like it looks like) on success, undef on failure, and the $! gets set.
Download (untitled) / with headers
text/plain 482b
On Sat Aug 23 22:10:38 2014, JHI wrote: Show quoted text
> I'm not familiar with the code... but at least the plain getsockopt() > returns a packed binary string (like it looks like) on success, undef > on failure, and the $! gets set.
This is a weeeeird weirdness of IO::Socket's getsockopt wrapper. If you getsockopt and it returns a binary string whose length matches that of pack("i"), it will presume it a packed integer and unpack it for you. You get no choice in the matter. -- Paul Evans


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.