Subject: | version 6.07 does not work with IO::Socket::INET6 |
Date: | Mon, 25 Aug 2014 11:05:08 +0200 |
To: | bug-Net-HTTP [...] rt.cpan.org |
From: | Thomas Eckardt <Thomas.Eckardt [...] thockar.com> |
- Perl version independend
- OS independend
This happens 100% on systems which supports IPv6 but has not a bound IPv6
address except localhost (::1) and on systems without any IPv6 support.
This was not verfied on a system with fully configured IPv6.
If IO::Socket::INET6 is installed but IO::Socket::IP is not - even the
make tests are failing and the module is no longer working anymore.
If IO::Socket::INET6 is uninstalled, the module is working fine in any
case.
This is related to the changes 6.06 -> 6.07
$VERSION = "6.07";
unless ($SOCKET_CLASS) {
# Try several, in order of capability and preference
if (eval { require IO::Socket::IP }) {
$SOCKET_CLASS = "IO::Socket::IP"; # IPv4+IPv6
} elsif (eval { require IO::Socket::INET6 }) {
$SOCKET_CLASS = "IO::Socket::INET6"; # IPv4+IPv6
} elsif (eval { require IO::Socket::INET }) {
$SOCKET_CLASS = "IO::Socket::INET"; # IPv4 only
} else {
require IO::Socket;
$SOCKET_CLASS = "IO::Socket::INET";
}
}
This is the dmake output from windows
c:\Perl\cpan\build\Net-HTTP-6.07>dmake test
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-MTest::Harness" "-e"
"undef *Test::Harness::Switches; test_harness(0,blib\lib', 'blib\arch')"
t/*.tt/apache-https.t .. print() on unopened filehandle GEN1 at
C:/Perl/lib/IO/Handle.pm line 472.
sysread() on unopened filehandle GEN1 at C:/Perl/lib/IO/Handle.pm line
465.
Status read failed: Bad file descriptor at
C:\Perl\cpan\build\Net-HTTP-6.07\blib\lib/Net/HTTP/Methods.pm line 276.
t/apache-https.t .. Dubious, test returned 9 (wstat 2304, 0x900)
Failed 8/8 subtests
t/apache.t ........ print() on unopened filehandle GEN1 at
C:/Perl/lib/IO/Handle.pm line 417.
sysread() on unopened filehandle GEN1 at C:/Perl/lib/IO/Handle.pm line
465.
Status read failed: Bad file descriptor at
C:\Perl\cpan\build\Net-HTTP-6.07\blib\lib/Net/HTTP/Methods.pm line 276.
t/apache.t ........ Dubious, test returned 9 (wstat 2304, 0x900)
Failed 8/8 subtests
t/http-nb.t ....... skipped: This test doesn't work on Windows
t/http.t .......... ok
Test Summary Report
-------------------
t/apache-https.t (Wstat: 2304 Tests: 0 Failed: 0)
Non-zero exit status: 9
Parse errors: Bad plan. You planned 8 tests but ran 0.
t/apache.t (Wstat: 2304 Tests: 0 Failed: 0)
Non-zero exit status: 9
Parse errors: Bad plan. You planned 8 tests but ran 0.
Files=4, Tests=37, 4 wallclock secs ( 0.09 usr + 0.06 sys = 0.16 CPU)
Result: FAIL
Failed 2/4 test programs. 0/37 subtests failed.
dmake.exe: Error code 255, while making 'test_dynamic'
It would be nice to have an option to preselect the $SOCKET_CLASS to use
at module load time, at least before the call to Net::HTTP->new() or as an
option in this call.
Now, setting $Net::HTTP::SOCKET_CLASS to any value before 'use Net::HTTP'
or 'require Net::HTTP' is useless, changing it after 'use' or 'require'
does not change @Net::HTTP::ISA - these variables are all not exported.
Thomas
DISCLAIMER:
*******************************************************
This email and any files transmitted with it may be confidential, legally
privileged and protected in law and are intended solely for the use of the
individual to whom it is addressed.
This email was multiple times scanned for viruses. There should be no
known virus in this email!
*******************************************************