Subject: | Wish for Net::NNTP to recognize LocalAddr option [patch included] |
Currently, Net::NNTP doesn't let the user specify from which ip address
to start client connections. This can be done by passing on the
LocalAddr to the call to SUPER->new.
A patch (including a .pod entry) against Version 2.23 is attached.
Subject: | Net-NNTP-LocalAddr.patch |
--- NNTP.pm 2007-03-10 13:00:30.015625000 +0100
+++ NNTP.pm.new 2007-03-10 13:00:58.562500000 +0100
@@ -46,7 +46,8 @@
Proto => 'tcp',
Timeout => defined $arg{Timeout}
? $arg{Timeout}
- : 120
+ : 120,
+ LocalAddr => $arg{LocalAddr} || '0.0.0.0'
) and last;
}
@@ -748,6 +749,11 @@
with a value of zero, then this command will not be sent and the
connection will be left talking to nnrpd.
+B<LocalAddr> - If multiple IP addresses are present on the client host
+with a valid route to the destination, you can specify the address your
+C<Net::NNTP> connects from and this way override the operating system's
+pick.
+
=back
=head1 METHODS