On Wed Jul 11 08:47:33 2012, michiel.beijen@gmail.com wrote:
Show quoted text> (Un?)fortunately I am not the maintainer of Net::POP3 and such.
> If your Glue module would glue with Net::Socket::IP using it would at
> least not break existing modules that use unpack_sockaddr_in - they
> would not be capable of doing IPv6, but at least using IPv4 they would
> still be working.
I'm not the maintainer either but fortunately it's open-source so obtaining it and writing a
patch is trivially simple.
Find attached a patch that just swaps Net::POP3 and friends to using IO::Socket::IP instead of
::INET. It passes the libnet distribution's unit tests, but that isn't saying very much because
Net::POP3 in particular is never unit-tested and most of the other tests are skipped. :(
But, try it out anyway and see how you get on, perhaps it solves your problem?
--
Paul Evans
=== modified file 'Makefile.PL'
--- Makefile.PL 2012-07-11 14:39:36 +0000
+++ Makefile.PL 2012-07-11 15:00:17 +0000
@@ -95,7 +95,8 @@
'realclean' => {FILES => $config_pm},
PREREQ_PM => {
Socket => 1.3,
- IO::Socket => 1.05
+ IO::Socket => 1.05,
+ IO::Socket::IP => 0,
},
dist => { DIST_DEFAULT => 'mydist', },
@ppd,
=== modified file 'Net/NNTP.pm'
--- Net/NNTP.pm 2012-07-11 14:39:36 +0000
+++ Net/NNTP.pm 2012-07-11 15:00:17 +0000
@@ -8,14 +8,14 @@
use strict;
use vars qw(@ISA $VERSION $debug);
-use IO::Socket;
+use IO::Socket::IP;
use Net::Cmd;
use Carp;
use Time::Local;
use Net::Config;
$VERSION = "2.24";
-@ISA = qw(Net::Cmd IO::Socket::INET);
+@ISA = qw(Net::Cmd IO::Socket::IP);
sub new {
@@ -731,7 +731,7 @@
Possible options are:
B<Host> - NNTP host to connect to. It may be a single scalar, as defined for
-the C<PeerAddr> option in L<IO::Socket::INET>, or a reference to
+the C<PeerAddr> option in L<IO::Socket::IP>, or a reference to
an array with hosts to try in turn. The L</host> method will return the value
which was used to connect to the host.
=== modified file 'Net/POP3.pm'
--- Net/POP3.pm 2012-07-11 14:39:36 +0000
+++ Net/POP3.pm 2012-07-11 15:00:17 +0000
@@ -7,7 +7,7 @@
package Net::POP3;
use strict;
-use IO::Socket;
+use IO::Socket::IP;
use vars qw(@ISA $VERSION $debug);
use Net::Cmd;
use Carp;
@@ -15,7 +15,7 @@
$VERSION = "2.29";
-@ISA = qw(Net::Cmd IO::Socket::INET);
+@ISA = qw(Net::Cmd IO::Socket::IP);
sub new {
@@ -578,7 +578,7 @@
Possible options are:
B<Host> - POP3 host to connect to. It may be a single scalar, as defined for
-the C<PeerAddr> option in L<IO::Socket::INET>, or a reference to
+the C<PeerAddr> option in L<IO::Socket::IP>, or a reference to
an array with hosts to try in turn. The L</host> method will return the value
which was used to connect to the host.
=== modified file 'Net/SMTP.pm'
--- Net/SMTP.pm 2012-07-11 14:39:36 +0000
+++ Net/SMTP.pm 2012-07-11 15:00:17 +0000
@@ -12,13 +12,13 @@
use vars qw($VERSION @ISA);
use Socket 1.3;
use Carp;
-use IO::Socket;
+use IO::Socket::IP;
use Net::Cmd;
use Net::Config;
$VERSION = "2.31";
-@ISA = qw(Net::Cmd IO::Socket::INET);
+@ISA = qw(Net::Cmd IO::Socket::IP);
sub new {
@@ -554,7 +554,7 @@
A new Net::SMTP object must be created with the I<new> method. Once
this has been done, all SMTP commands are accessed through this object.
-The Net::SMTP class is a subclass of Net::Cmd and IO::Socket::INET.
+The Net::SMTP class is a subclass of Net::Cmd and IO::Socket::IP.
=head1 EXAMPLES
@@ -609,7 +609,7 @@
will be used.
B<Host> - SMTP host to connect to. It may be a single scalar, as defined for
-the C<PeerAddr> option in L<IO::Socket::INET>, or a reference to
+the C<PeerAddr> option in L<IO::Socket::IP>, or a reference to
an array with hosts to try in turn. The L</host> method will return the value
which was used to connect to the host.
@@ -679,7 +679,7 @@
=item host ()
-Returns the value used by the constructor, and passed to IO::Socket::INET,
+Returns the value used by the constructor, and passed to IO::Socket::IP,
to connect to the host.
=item etrn ( DOMAIN )
=== modified file 'Net/Time.pm'
--- Net/Time.pm 2012-07-11 14:39:36 +0000
+++ Net/Time.pm 2012-07-11 15:00:17 +0000
@@ -9,7 +9,7 @@
use strict;
use vars qw($VERSION @ISA @EXPORT_OK $TIMEOUT);
use Carp;
-use IO::Socket;
+use IO::Socket::IP;
require Exporter;
use Net::Config;
use IO::Select;
@@ -34,7 +34,7 @@
my $me;
foreach $host (@$hosts) {
- $me = IO::Socket::INET->new(
+ $me = IO::Socket::IP->new(
PeerAddr => $host,
PeerPort => $port,
Proto => $proto