Subject: | Net::TCP requirement is antiquated. |
Since it seems that Net-ext (provides Net::TCP) hasn't had a release in 8
years and IO::Socket is well maintained why not use IO::Socket?
Attached is a simple patch that provides this support.
Subject: | use_io_socket.patch |
--- lib/Net/IRR.pm.orig 2010-02-25 03:06:52.229333080 -0800
+++ lib/Net/IRR.pm 2010-02-25 03:08:20.941344990 -0800
@@ -4,7 +4,7 @@
use warnings;
use Carp;
-use Net::TCP;
+use IO::Socket::INET;
use vars qw/ @ISA %EXPORT_TAGS @EXPORT_OK $VERSION /;
@@ -32,8 +32,10 @@
$self->{port} = $args{port} || 43;
eval {
local $SIG{__WARN__} = sub { $self->{errstr} = shift };
- $self->{tcp} = Net::TCP->new($self->{host}, $self->{port})
- or warn "cannot create Net::TCP object: $!";
+ $self->{tcp} = IO::Socket::INET->new(
+ PeerAddr => $self->{host},
+ PeerPort => $self->{port}
+ ) or warn "cannot create Net::TCP object: $!";
};
return undef if $self->error();
$self->_multi_mode();