Skip Menu |
 

This queue is for tickets about the Socket CPAN distribution.

Report information
The Basics
Id: 95758
Status: resolved
Priority: 0/
Queue: Socket

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

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



Subject: AI_NUMERICHOST not globally supported
Download (untitled) / with headers
text/plain 1.2k
On my system this happens: C:\Users\Mithaldu>perl -MSocket=getaddrinfo,AI_NUMERICHOST -MData::Dump=pp -E "say pp [ getaddrinfo( q[127.0.0.1], 80, { flags => AI_NUMERICHOST } ) ]" ["nodename nor servname provided, or not known"] C:\Users\Mithaldu>perl -MSocket=getaddrinfo,AI_NUMERICHOST -MData::Dump=pp -E "say pp [ getaddrinfo( q[127.0.0.1], 80 ) ]" [ "", { addr => "\2\0\0P\x7F\0\0\1\0\0\0\0\0\0\0\0", canonname => undef, family => 2, protocol => 6, socktype => 1, }, { addr => "\2\0\0P\x7F\0\0\1\0\0\0\0\0\0\0\0", canonname => undef, family => 2, protocol => 17, socktype => 2, }, { addr => "\2\0\0P\x7F\0\0\1\0\0\0\0\0\0\0\0", canonname => undef, family => 2, protocol => 0, socktype => 3, }, ] C:\Users\Mithaldu>cpan Socket CPAN: Term::ANSIColor loaded ok (v4.02) CPAN: Win32::Console::ANSI loaded ok (v1.06) CPAN: Storable loaded ok (v2.45) Reading 'C:\Perl\cpan\Metadata' Database was generated on Sat, 17 May 2014 12:53:02 GMT CPAN: Module::CoreList loaded ok (v3.03) Socket is up to date (2.013). C:\Users\Mithaldu>perl -v This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail)
Download (untitled) / with headers
text/plain 410b
On initial investigation via IRC, the following is observed: 1) this error comes from the fake_getaddrinfo() emulation 2) the faked emulation is used because the configure-like test fails to find a useable getaddrinfo(3). 3) ws2tcpip.h on the platform does declare getaddrinfo(3) but it's protected by an #if whose condition is false. Overriding that causes a link-time error instead. -- Paul Evans
HAH! Bug is found to be the $REGEXP_IPv4_DOTTEDQUAD regexp. Patch attached -- Paul Evans
Subject: rt95758.patch
Download rt95758.patch
text/x-diff 457b
=== modified file 'Socket.pm' --- Socket.pm 2013-10-28 00:52:11 +0000 +++ Socket.pm 2014-05-31 23:01:39 +0000 @@ -935,7 +935,7 @@ # family # Borrowed from Regexp::Common::net -my $REGEXP_IPv4_DECIMAL = qr/25[0-5]|2[0-4][0-9]|1?[0-9][0-9]{1,2}/; +my $REGEXP_IPv4_DECIMAL = qr/25[0-5]|2[0-4][0-9]|1?[0-9]{1,2}/; my $REGEXP_IPv4_DOTTEDQUAD = qr/$REGEXP_IPv4_DECIMAL\.$REGEXP_IPv4_DECIMAL\.$REGEXP_IPv4_DECIMAL\.$REGEXP_IPv4_DECIMAL/; sub fake_makeerr
Released in 2.014 -- 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.