Skip Menu |
 

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

Report information
The Basics
Id: 124431
Status: resolved
Priority: 0/
Queue: IO-Socket-SSL

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

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



Subject: compilation problem with NI_NUMERICHOST
Download (untitled) / with headers
text/plain 404b
NI_NUMERICHOST is used as a bareword, so it must be defined if it is used conditionally. NI_NUMERICHOST is defined in one of two evals in BEGIN block. For me (Windows XP) first eval fails. If Socket6 is nor installed, second eval fails too and module compilation fails. Possible solution: use NI_NUMERICHOST() instead of NI_NUMERICHOST. Same for NI_NUMERICSERV. -- Alexandr Ciornii, http://chorny.net
Download (untitled) / with headers
text/plain 534b
Am Mi 14. Feb 2018, 14:26:48, CHORNY schrieb: Show quoted text
> NI_NUMERICHOST is used as a bareword, so it must be defined if it is > used conditionally. > NI_NUMERICHOST is defined in one of two evals in BEGIN block. For me > (Windows XP) first eval fails. If Socket6 is nor installed, second > eval fails too and module compilation fails. > > Possible solution: use NI_NUMERICHOST() instead of NI_NUMERICHOST. > Same for NI_NUMERICSERV.
This should hopefully be fixed in commit 2c475e7 where I define the NI_* constants if no IPv6 is available.
Download (untitled) / with headers
text/plain 765b
On Wed Feb 14 15:10:22 2018, SULLR wrote: Show quoted text
> This should hopefully be fixed in commit 2c475e7 where I define the > NI_* constants if no IPv6 is available.
It isn't. Tests still die. I wrote a simple program to test and it dies too: use strict; use constant; BEGIN { constant->import( CAN_IPV6 => '', NI_NUMERICHOST => 1, NI_NUMERICSERV => 2); } print "NI_NUMERICHOST=",NI_NUMERICHOST,"\n"; Socket is a core module, so it is always present. And it is always loaded by IO::Socket::SSL if it is present. If Socket::NI_NUMERICHOST == Socket6::NI_NUMERICHOST (same for NI_NUMERICSERV), most simple way is to write "use Socket qw/NI_NUMERICHOST NI_NUMERICSERV/" at the start of program. P.S. On Windows NI_NUMERICHOST is 2 -- Alexandr Ciornii, http://chorny.net
Download (untitled) / with headers
text/plain 892b
Am Mi 14. Feb 2018, 15:43:41, CHORNY schrieb: Show quoted text
> On Wed Feb 14 15:10:22 2018, SULLR wrote:
> > This should hopefully be fixed in commit 2c475e7 where I define the > > NI_* constants if no IPv6 is available.
> > It isn't. Tests still die.
Should be hopefully better now with commit 276e780 Show quoted text
> > Socket is a core module, so it is always present. And it is always > loaded by IO::Socket::SSL if it is present. If Socket::NI_NUMERICHOST > == Socket6::NI_NUMERICHOST (same for NI_NUMERICSERV), most simple way > is to write "use Socket qw/NI_NUMERICHOST NI_NUMERICSERV/" at the > start of program.
The NI_* constants not available in older versions of the Socket module so I cannot rely on this. Show quoted text
> > P.S. On Windows NI_NUMERICHOST is 2
This actually does not matter. The constants are only used if IPv6 is available and in this case they should have been defined with the correct values.


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.