diff options
author | Graham Barr <gbarr@pobox.com> | 1998-04-19 00:25:11 +0000 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 1998-04-19 00:25:11 +0000 |
commit | 8587346e9452f2df5061b68390dfe7e6f11254e3 (patch) | |
tree | 41b1e671155087faebeb178a7faee1423bcf6196 | |
parent | 541ba79ff6222717399650f0da1c58d082c084b3 (diff) | |
download | perl-libnet-8587346e9452f2df5061b68390dfe7e6f11254e3.tar.gz |
Net::POP3
- Added ResvPort option to new()
-rw-r--r-- | Net/POP3.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Net/POP3.pm b/Net/POP3.pm index 3e96c66..0ba25a6 100644 --- a/Net/POP3.pm +++ b/Net/POP3.pm @@ -13,7 +13,7 @@ use Net::Cmd; use Carp; use Net::Config; -$VERSION = "2.15"; # $Id: //depot/libnet/Net/POP3.pm#9 $ +$VERSION = "2.16"; # $Id: //depot/libnet/Net/POP3.pm#10 $ @ISA = qw(Net::Cmd IO::Socket::INET); @@ -25,6 +25,7 @@ sub new my %arg = @_; my $hosts = defined $host ? [ $host ] : $NetConfig{pop3_hosts}; my $obj; + my @localport = exists $arg{ResvPort} ? ( LocalPort => $arg{ResvPort} ): (); my $h; foreach $h (@{$hosts}) @@ -32,6 +33,7 @@ sub new $obj = $type->SUPER::new(PeerAddr => ($host = $h), PeerPort => $arg{Port} || 'pop3(110)', Proto => 'tcp', + @localport, Timeout => defined $arg{Timeout} ? $arg{Timeout} : 120 @@ -370,6 +372,10 @@ will be used. C<OPTIONS> are passed in a hash like fashion, using key and value pairs. Possible options are: +B<ResvPort> - If given then the socket for the C<Net::POP3> object +will be bound to the local port given using C<bind> when the socket is +created. + B<Timeout> - Maximum time, in seconds, to wait for a response from the POP3 server (default: 120) |