Subject: | Make IPv6 usage more sane |
For some bizarre reason, Net::LDAP requires a flag to enable IPv6.
Since IO::Socket::INET6 supports both IPv4 and IPv6, this seems rather odd.
I would instead suggest doing what every other perl module I use does --
Test if IO::Socket::INET6 is available to load. If it is, then use it.
If not, don't. Then there is no need for an obnoxious flag that
requires writing special code or rewriting every script ever written
using Net::LDAP just for IPv6 support.
For example, from IO::Socket::SSL;
if ( ! eval {
require Socket6;
Socket6->import( 'inet_pton' );
require IO::Socket::INET6;
@ISA = qw(IO::Socket::INET6);
$can_ipv6 = 1;
}) {
@ISA = qw(IO::Socket::INET);
}
I.e., see if we can do IPv6 or not.