summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/Net
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-04-18 23:10:57 +0000
committerKarl Berry <karl@freefriends.org>2017-04-18 23:10:57 +0000
commit40b4b6e177c62a14c166dbba6adf3abc415af4b2 (patch)
tree2996bf29509c806bd8064fb6cf38092c1b375ff8 /Master/tlpkg/tlperl/lib/Net
parent8e743c86b6872f30b7a35c72aa944455157d4b3f (diff)
tlperl 5.24.1 from siep
git-svn-id: svn://tug.org/texlive/trunk@43914 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Net')
-rw-r--r--Master/tlpkg/tlperl/lib/Net/Cmd.pm188
-rw-r--r--Master/tlpkg/tlperl/lib/Net/Config.pm33
-rw-r--r--Master/tlpkg/tlperl/lib/Net/Domain.pm12
-rw-r--r--Master/tlpkg/tlperl/lib/Net/FTP.pm91
-rw-r--r--Master/tlpkg/tlperl/lib/Net/FTP/A.pm2
-rw-r--r--Master/tlpkg/tlperl/lib/Net/FTP/E.pm2
-rw-r--r--Master/tlpkg/tlperl/lib/Net/FTP/I.pm2
-rw-r--r--Master/tlpkg/tlperl/lib/Net/FTP/L.pm2
-rw-r--r--Master/tlpkg/tlperl/lib/Net/FTP/dataconn.pm2
-rw-r--r--Master/tlpkg/tlperl/lib/Net/NNTP.pm55
-rw-r--r--Master/tlpkg/tlperl/lib/Net/Netrc.pm12
-rw-r--r--Master/tlpkg/tlperl/lib/Net/POP3.pm47
-rw-r--r--Master/tlpkg/tlperl/lib/Net/Ping.pm8
-rw-r--r--Master/tlpkg/tlperl/lib/Net/SMTP.pm82
-rw-r--r--Master/tlpkg/tlperl/lib/Net/Time.pm12
15 files changed, 328 insertions, 222 deletions
diff --git a/Master/tlpkg/tlperl/lib/Net/Cmd.pm b/Master/tlpkg/tlperl/lib/Net/Cmd.pm
index 2614e695391..3a5d4d9a547 100644
--- a/Master/tlpkg/tlperl/lib/Net/Cmd.pm
+++ b/Master/tlpkg/tlperl/lib/Net/Cmd.pm
@@ -2,10 +2,11 @@
#
# Versions up to 2.29_1 Copyright (c) 1995-2006 Graham Barr <gbarr@pobox.com>.
# All rights reserved.
-# Changes in Version 2.29_2 onwards Copyright (C) 2013-2014 Steve Hay. All
+# Changes in Version 2.29_2 onwards Copyright (C) 2013-2015 Steve Hay. All
# rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
+# This module is free software; you can redistribute it and/or modify it under
+# the same terms as Perl itself, i.e. under the terms of either the GNU General
+# Public License or the Artistic License, as specified in the F<LICENCE> file.
package Net::Cmd;
@@ -17,6 +18,7 @@ use warnings;
use Carp;
use Exporter;
use Symbol 'gensym';
+use Errno 'EINTR';
BEGIN {
if ($^O eq 'os390') {
@@ -26,22 +28,7 @@ BEGIN {
}
}
-BEGIN {
- if (!eval { require utf8 }) {
- *is_utf8 = sub { 0 };
- }
- elsif (eval { utf8::is_utf8(undef); 1 }) {
- *is_utf8 = \&utf8::is_utf8;
- }
- elsif (eval { require Encode; Encode::is_utf8(undef); 1 }) {
- *is_utf8 = \&Encode::is_utf8;
- }
- else {
- *is_utf8 = sub { $_[0] =~ /[^\x00-\xff]/ };
- }
-}
-
-our $VERSION = "3.05";
+our $VERSION = "3.08_01";
our @ISA = qw(Exporter);
our @EXPORT = qw(CMD_INFO CMD_OK CMD_MORE CMD_REJECT CMD_ERROR CMD_PENDING);
@@ -203,7 +190,57 @@ sub set_status {
1;
}
+sub _syswrite_with_timeout {
+ my $cmd = shift;
+ my $line = shift;
+ my $len = length($line);
+ my $offset = 0;
+ my $win = "";
+ vec($win, fileno($cmd), 1) = 1;
+ my $timeout = $cmd->timeout || undef;
+ my $initial = time;
+ my $pending = $timeout;
+
+ local $SIG{PIPE} = 'IGNORE' unless $^O eq 'MacOS';
+
+ while ($len) {
+ my $wout;
+ my $nfound = select(undef, $wout = $win, undef, $pending);
+ if ((defined $nfound and $nfound > 0) or -f $cmd) # -f for testing on win32
+ {
+ my $w = syswrite($cmd, $line, $len, $offset);
+ if (! defined($w) ) {
+ my $err = $!;
+ $cmd->close;
+ $cmd->_set_status_closed($err);
+ return;
+ }
+ $len -= $w;
+ $offset += $w;
+ }
+ elsif ($nfound == -1) {
+ if ( $! == EINTR ) {
+ if ( defined($timeout) ) {
+ redo if ($pending = $timeout - ( time - $initial ) ) > 0;
+ $cmd->_set_status_timeout;
+ return;
+ }
+ redo;
+ }
+ my $err = $!;
+ $cmd->close;
+ $cmd->_set_status_closed($err);
+ return;
+ }
+ else {
+ $cmd->_set_status_timeout;
+ return;
+ }
+ }
+
+ return 1;
+}
sub _set_status_timeout {
my $cmd = shift;
@@ -215,17 +252,18 @@ sub _set_status_timeout {
sub _set_status_closed {
my $cmd = shift;
+ my $err = shift;
my $pkg = ref($cmd) || $cmd;
$cmd->set_status($cmd->DEF_REPLY_CODE, "[$pkg] Connection closed");
carp(ref($cmd) . ": " . (caller(1))[3]
- . "(): unexpected EOF on command channel: $!") if $cmd->debug;
+ . "(): unexpected EOF on command channel: $err") if $cmd->debug;
}
sub _is_closed {
my $cmd = shift;
if (!defined fileno($cmd)) {
- $cmd->_set_status_closed;
+ $cmd->_set_status_closed($!);
return 1;
}
return 0;
@@ -241,8 +279,6 @@ sub command {
if (exists ${*$cmd}{'net_cmd_last_ch'});
if (scalar(@_)) {
- local $SIG{PIPE} = 'IGNORE' unless $^O eq 'MacOS';
-
my $str = join(
" ",
map {
@@ -254,17 +290,13 @@ sub command {
$str = $cmd->toascii($str) if $tr;
$str .= "\015\012";
- my $len = length $str;
- my $swlen;
-
$cmd->debug_print(1, $str)
if ($cmd->debug);
- unless (defined($swlen = syswrite($cmd,$str,$len)) && $swlen == $len) {
- $cmd->close;
- $cmd->_set_status_closed;
- return $cmd;
- }
+ # though documented to return undef on failure, the legacy behavior
+ # was to return $cmd even on failure, so this odd construct does that
+ $cmd->_syswrite_with_timeout($str)
+ or return $cmd;
}
$cmd;
@@ -314,8 +346,9 @@ sub getline {
my $select_ret = select($rout = $rin, undef, undef, $timeout);
if ($select_ret > 0) {
unless (sysread($cmd, $buf = "", 1024)) {
+ my $err = $!;
$cmd->close;
- $cmd->_set_status_closed;
+ $cmd->_set_status_closed($err);
return;
}
@@ -428,9 +461,17 @@ sub datasend {
my $arr = @_ == 1 && ref($_[0]) ? $_[0] : \@_;
my $line = join("", @$arr);
- # encode to individual utf8 bytes if
- # $line is a string (in internal UTF-8)
- utf8::encode($line) if is_utf8($line);
+ # Perls < 5.10.1 (with the exception of 5.8.9) have a performance problem with
+ # the substitutions below when dealing with strings stored internally in
+ # UTF-8, so downgrade them (if possible).
+ # Data passed to datasend() should be encoded to octets upstream already so
+ # shouldn't even have the UTF-8 flag on to start with, but if it so happens
+ # that the octets are stored in an upgraded string (as can sometimes occur)
+ # then they would still downgrade without fail anyway.
+ # Only Unicode codepoints > 0xFF stored in an upgraded string will fail to
+ # downgrade. We fail silently in that case, and a "Wide character in print"
+ # warning will be emitted later by syswrite().
+ utf8::downgrade($line, 1) if $] < 5.010001 && $] != 5.008009;
return 0
if $cmd->_is_closed;
@@ -469,33 +510,8 @@ sub datasend {
${*$cmd}{'net_cmd_last_ch'} = substr($line, -1, 1);
- my $len = length($line);
- my $offset = 0;
- my $win = "";
- vec($win, fileno($cmd), 1) = 1;
- my $timeout = $cmd->timeout || undef;
-
- local $SIG{PIPE} = 'IGNORE' unless $^O eq 'MacOS';
-
- while ($len) {
- my $wout;
- my $s = select(undef, $wout = $win, undef, $timeout);
- if ((defined $s and $s > 0) or -f $cmd) # -f for testing on win32
- {
- my $w = syswrite($cmd, $line, $len, $offset);
- unless (defined($w) && $w == $len) {
- $cmd->close;
- $cmd->_set_status_closed;
- return;
- }
- $len -= $w;
- $offset += $w;
- }
- else {
- $cmd->_set_status_timeout;
- return;
- }
- }
+ $cmd->_syswrite_with_timeout($line)
+ or return;
1;
}
@@ -517,30 +533,8 @@ sub rawdatasend {
print STDERR $b, join("\n$b", split(/\n/, $line)), "\n";
}
- my $len = length($line);
- my $offset = 0;
- my $win = "";
- vec($win, fileno($cmd), 1) = 1;
- my $timeout = $cmd->timeout || undef;
-
- local $SIG{PIPE} = 'IGNORE' unless $^O eq 'MacOS';
- while ($len) {
- my $wout;
- if (select(undef, $wout = $win, undef, $timeout) > 0) {
- my $w = syswrite($cmd, $line, $len, $offset);
- unless (defined($w) && $w == $len) {
- $cmd->close;
- $cmd->_set_status_closed;
- return;
- }
- $len -= $w;
- $offset += $w;
- }
- else {
- $cmd->_set_status_timeout;
- return;
- }
- }
+ $cmd->_syswrite_with_timeout($line)
+ or return;
1;
}
@@ -564,19 +558,11 @@ sub dataend {
$tosend .= ".\015\012";
- local $SIG{PIPE} = 'IGNORE' unless $^O eq 'MacOS';
-
$cmd->debug_print(1, ".\n")
if ($cmd->debug);
- my $len = length $tosend;
- my $w = syswrite($cmd, $tosend, $len);
- unless (defined($w) && $w == $len)
- {
- $cmd->close;
- $cmd->_set_status_closed;
- return 0;
- }
+ $cmd->_syswrite_with_timeout($tosend)
+ or return 0;
delete ${*$cmd}{'net_cmd_last_ch'};
@@ -721,6 +707,8 @@ is pending then C<CMD_PENDING> is returned.
Send data to the remote server, converting LF to CRLF. Any line starting
with a '.' will be prefixed with another '.'.
C<DATA> may be an array or a reference to an array.
+The C<DATA> passed in must be encoded by the caller to octets of whatever
+encoding is required, e.g. by using the Encode module's C<encode()> function.
=item dataend ()
@@ -793,6 +781,9 @@ Unget a line of text from the server.
Send data to the remote server without performing any conversions. C<DATA>
is a scalar.
+As with C<datasend()>, the C<DATA> passed in must be encoded by the caller
+to octets of whatever encoding is required, e.g. by using the Encode module's
+C<encode()> function.
=item read_until_dot ()
@@ -870,7 +861,8 @@ Versions up to 2.29_1 Copyright (c) 1995-2006 Graham Barr. All rights reserved.
Changes in Version 2.29_2 onwards Copyright (C) 2013-2014 Steve Hay. All rights
reserved.
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
+This module is free software; you can redistribute it and/or modify it under the
+same terms as Perl itself, i.e. under the terms of either the GNU General Public
+License or the Artistic License, as specified in the F<LICENCE> file.
=cut
diff --git a/Master/tlpkg/tlperl/lib/Net/Config.pm b/Master/tlpkg/tlperl/lib/Net/Config.pm
index 953a826a68e..3e4ab0a03be 100644
--- a/Master/tlpkg/tlperl/lib/Net/Config.pm
+++ b/Master/tlpkg/tlperl/lib/Net/Config.pm
@@ -4,8 +4,9 @@
# All rights reserved.
# Changes in Version 1.11_01 onwards Copyright (C) 2013-2014 Steve Hay. All
# rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
+# This module is free software; you can redistribute it and/or modify it under
+# the same terms as Perl itself, i.e. under the terms of either the GNU General
+# Public License or the Artistic License, as specified in the F<LICENCE> file.
package Net::Config;
@@ -19,11 +20,16 @@ use Socket qw(inet_aton inet_ntoa);
our @EXPORT = qw(%NetConfig);
our @ISA = qw(Net::LocalCfg Exporter);
-our $VERSION = "3.05";
+our $VERSION = "3.08_01";
our($CONFIGURE, $LIBNET_CFG);
-eval { local $SIG{__DIE__}; require Net::LocalCfg };
+eval {
+ local @INC = @INC;
+ pop @INC if $INC[-1] eq '.';
+ local $SIG{__DIE__};
+ require Net::LocalCfg;
+};
our %NetConfig = (
nntp_hosts => [],
@@ -133,7 +139,7 @@ __END__
Net::Config - Local configuration data for libnet
-=head1 SYNOPSYS
+=head1 SYNOPSIS
use Net::Config qw(%NetConfig);
@@ -319,4 +325,21 @@ If true then C<Configure> will check each hostname given that it exists
=back
+=head1 AUTHOR
+
+Graham Barr E<lt>F<gbarr@pobox.com>E<gt>
+
+Steve Hay E<lt>F<shay@cpan.org>E<gt> is now maintaining libnet as of version
+1.22_02
+
+=head1 COPYRIGHT
+
+Versions up to 1.11 Copyright (c) 1998-2011 Graham Barr. All rights reserved.
+Changes in Version 1.11_01 onwards Copyright (C) 2013-2014 Steve Hay. All
+rights reserved.
+
+This module is free software; you can redistribute it and/or modify it under the
+same terms as Perl itself, i.e. under the terms of either the GNU General Public
+License or the Artistic License, as specified in the F<LICENCE> file.
+
=cut
diff --git a/Master/tlpkg/tlperl/lib/Net/Domain.pm b/Master/tlpkg/tlperl/lib/Net/Domain.pm
index 3b274a66cff..53822da103a 100644
--- a/Master/tlpkg/tlperl/lib/Net/Domain.pm
+++ b/Master/tlpkg/tlperl/lib/Net/Domain.pm
@@ -4,8 +4,9 @@
# All rights reserved.
# Changes in Version 2.22 onwards Copyright (C) 2013-2014 Steve Hay. All rights
# reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
+# This module is free software; you can redistribute it and/or modify it under
+# the same terms as Perl itself, i.e. under the terms of either the GNU General
+# Public License or the Artistic License, as specified in the F<LICENCE> file.
package Net::Domain;
@@ -20,7 +21,7 @@ use Net::Config;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(hostname hostdomain hostfqdn domainname);
-our $VERSION = "3.05";
+our $VERSION = "3.08_01";
my ($host, $domain, $fqdn) = (undef, undef, undef);
@@ -356,7 +357,8 @@ Versions up to 2.21 Copyright (c) 1995-1998 Graham Barr. All rights reserved.
Changes in Version 2.22 onwards Copyright (C) 2013-2014 Steve Hay. All rights
reserved.
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
+This module is free software; you can redistribute it and/or modify it under the
+same terms as Perl itself, i.e. under the terms of either the GNU General Public
+License or the Artistic License, as specified in the F<LICENCE> file.
=cut
diff --git a/Master/tlpkg/tlperl/lib/Net/FTP.pm b/Master/tlpkg/tlperl/lib/Net/FTP.pm
index c791fac502f..f3beb2511c5 100644
--- a/Master/tlpkg/tlperl/lib/Net/FTP.pm
+++ b/Master/tlpkg/tlperl/lib/Net/FTP.pm
@@ -2,10 +2,11 @@
#
# Versions up to 2.77_2 Copyright (c) 1995-2004 Graham Barr <gbarr@pobox.com>.
# All rights reserved.
-# Changes in Version 2.77_3 onwards Copyright (C) 2013-2014 Steve Hay. All
+# Changes in Version 2.77_3 onwards Copyright (C) 2013-2015 Steve Hay. All
# rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
+# This module is free software; you can redistribute it and/or modify it under
+# the same terms as Perl itself, i.e. under the terms of either the GNU General
+# Public License or the Artistic License, as specified in the F<LICENCE> file.
#
# Documentation (at end) improved 1996 by Nathan Torkington <gnat@frii.com>.
@@ -24,9 +25,10 @@ use Net::Config;
use Socket;
use Time::Local;
-our $VERSION = '3.05';
+our $VERSION = '3.08_01';
our $IOCLASS;
+my $family_key;
BEGIN {
# Code for detecting if we can use SSL
my $ssl_class = eval {
@@ -54,6 +56,10 @@ BEGIN {
sub can_inet6 { $inet6_class };
$IOCLASS = $ssl_class || $inet6_class || 'IO::Socket::INET';
+ $family_key =
+ ( $ssl_class ? $ssl_class->can_ipv6 : $inet6_class || '' )
+ eq 'IO::Socket::IP'
+ ? 'Family' : 'Domain';
}
our @ISA = ('Exporter','Net::Cmd',$IOCLASS);
@@ -119,6 +125,7 @@ sub new {
PeerAddr => $peer,
PeerPort => $arg{Port} || ($arg{SSL} ? 'ftps(990)' : 'ftp(21)'),
LocalAddr => $arg{'LocalAddr'},
+ $family_key => $arg{Domain} || $arg{Family},
Proto => 'tcp',
Timeout => defined $arg{Timeout} ? $arg{Timeout} : 120,
%tlsargs,
@@ -130,6 +137,7 @@ sub new {
${*$ftp}{'net_ftp_blksize'} = abs($arg{'BlockSize'} || 10240);
${*$ftp}{'net_ftp_localaddr'} = $arg{'LocalAddr'};
+ ${*$ftp}{'net_ftp_domain'} = $arg{Domain} || $arg{Family};
${*$ftp}{'net_ftp_firewall'} = $fire
if (defined $fire);
@@ -452,7 +460,7 @@ sub authorize {
my $ok = $ftp->_AUTH($auth || "");
- $ok = $ftp->_RESP($resp || "")
+ return $ftp->_RESP($resp || "")
if ($ok == CMD_MORE);
$ok == CMD_OK;
@@ -661,8 +669,12 @@ sub rmdir {
or !$recurse;
# Try to delete the contents
- # Get a list of all the files in the directory
- my @filelist = grep { !/^\.{1,2}$/ } $ftp->ls($dir);
+ # Get a list of all the files in the directory, excluding the current and parent directories
+ my @filelist = map { /^(?:\S+;)+ (.+)$/ ? ($1) : () } grep { !/^(?:\S+;)*type=[cp]dir;/ } $ftp->_list_cmd("MLSD", $dir);
+
+ # Fallback to using the less well-defined NLST command if MLSD fails
+ @filelist = grep { !/^\.{1,2}$/ } $ftp->ls($dir)
+ unless @filelist;
return
unless @filelist; # failed, it is probably not a directory
@@ -888,9 +900,10 @@ sub _eprt {
Listen => 1,
Timeout => $ftp->timeout,
LocalAddr => $ftp->sockhost,
+ $family_key => $ftp->sockdomain,
can_ssl() ? (
- %{ ${*$ftp}{net_ftp_tlsargs} },
- SSL_startHandshake => 0,
+ %{ ${*$ftp}{net_ftp_tlsargs} },
+ SSL_startHandshake => 0,
):(),
);
${*$ftp}{net_ftp_intern_port} = 1;
@@ -1034,17 +1047,18 @@ sub _dataconn {
PeerAddr => $pasv->[0],
PeerPort => $pasv->[1],
LocalAddr => ${*$ftp}{net_ftp_localaddr},
+ $family_key => ${*$ftp}{net_ftp_domain},
Timeout => $ftp->timeout,
can_ssl() ? (
- SSL_startHandshake => 0,
- $ftp->is_SSL ? (
- SSL_reuse_ctx => $ftp,
- SSL_verifycn_name => ${*$ftp}{net_ftp_tlsargs}{SSL_verifycn_name},
- # This will cause the use of SNI if supported by IO::Socket::SSL.
- $ftp->can_client_sni ? (
- SSL_hostname => ${*$ftp}{net_ftp_tlsargs}{SSL_hostname}
- ):(),
- ) :( %{${*$ftp}{net_ftp_tlsargs}} ),
+ SSL_startHandshake => 0,
+ $ftp->is_SSL ? (
+ SSL_reuse_ctx => $ftp,
+ SSL_verifycn_name => ${*$ftp}{net_ftp_tlsargs}{SSL_verifycn_name},
+ # This will cause the use of SNI if supported by IO::Socket::SSL.
+ $ftp->can_client_sni ? (
+ SSL_hostname => ${*$ftp}{net_ftp_tlsargs}{SSL_hostname}
+ ):(),
+ ) :( %{${*$ftp}{net_ftp_tlsargs}} ),
):(),
) or return;
} elsif (my $listen = delete ${*$ftp}{net_ftp_listen}) {
@@ -1141,7 +1155,7 @@ sub _data_cmd {
my $data = $ftp->_dataconn();
if (CMD_INFO == $ftp->response()) {
$data->reading
- if $data && $cmd =~ /RETR|LIST|NLST/;
+ if $data && $cmd =~ /RETR|LIST|NLST|MLSD/;
return $data;
}
$data->_close if $data;
@@ -1180,7 +1194,7 @@ sub _data_cmd {
my $data = $ftp->_dataconn();
$data->reading
- if $data && $cmd =~ /RETR|LIST|NLST/;
+ if $data && $cmd =~ /RETR|LIST|NLST|MLSD/;
return $data;
}
@@ -1434,10 +1448,15 @@ Net::FTP - FTP Client class
=head1 DESCRIPTION
C<Net::FTP> is a class implementing a simple FTP client in Perl as
-described in RFC959. It provides wrappers for a subset of the RFC959
-commands.
+described in RFC959. It provides wrappers for the commonly used subset of the
+RFC959 commands.
+If L<IO::Socket::IP> or L<IO::Socket::INET6> is installed it also provides
+support for IPv6 as defined in RFC2428.
+And with L<IO::Socket::SSL> installed it provides support for implicit FTPS
+and explicit FTPS as defined in RFC4217.
-The Net::FTP class is a subclass of Net::Cmd and IO::Socket::INET.
+The Net::FTP class is a subclass of Net::Cmd and (depending on avaibility) of
+IO::Socket::IP, IO::Socket::INET6 or IO::Socket::INET.
=head1 OVERVIEW
@@ -1538,8 +1557,15 @@ simply invokes the C<hash()> method for you, so that hash marks
are displayed for all transfers. You can, of course, call C<hash()>
explicitly whenever you'd like.
-B<LocalAddr> - Local address to use for all socket connections, this
-argument will be passed to L<IO::Socket::INET>
+B<LocalAddr> - Local address to use for all socket connections. This
+argument will be passed to the super class, i.e. L<IO::Socket::INET>
+or L<IO::Socket::IP>.
+
+B<Domain> - Domain to use, i.e. AF_INET or AF_INET6. This
+argument will be passed to the IO::Socket super class.
+This can be used to enforce IPv4 even with L<IO::Socket::IP>
+which would default to IPv6.
+B<Family> is accepted as alternative name for B<Domain>.
If the constructor fails undef will be returned and an error message will
be in $@
@@ -1591,8 +1617,8 @@ Only C<LEVEL>s "C" (clear) and "P" (private) are supported.
=item host ()
-Returns the value used by the constructor, and passed to IO::Socket::INET,
-to connect to the host.
+Returns the value used by the constructor, and passed to the IO::Socket super
+class to connect to the host.
=item account( ACCT )
@@ -1839,6 +1865,7 @@ C<put_unique> and those that do not require data connections.
=over 4
=item port ( [ PORT ] )
+
=item eprt ( [ PORT ] )
Send a C<PORT> (IPv4) or C<EPRT> (IPv6) command to the server. If C<PORT> is
@@ -1846,6 +1873,7 @@ specified then it is sent to the server. If not, then a listen socket is created
and the correct information sent to the server.
=item pasv ()
+
=item epsv ()
Tell the server to go into passive mode (C<pasv> for IPv4, C<epsv> for IPv6).
@@ -1963,7 +1991,7 @@ It may be difficult for me to reproduce the problem as almost every setup
is different.
A small script which yields the problem will probably be of help. It would
-also be useful if this script was run with the extra options C<Debug => 1>
+also be useful if this script was run with the extra options C<< Debug => 1 >>
passed to the constructor, and the output sent with the bug report. If you
cannot include a small script then please include a Debug trace from a
run of your program which does yield the problem.
@@ -2011,10 +2039,11 @@ Roderick Schertler <roderick@gate.net> - for various inputs
=head1 COPYRIGHT
Versions up to 2.77_2 Copyright (c) 1995-2004 Graham Barr. All rights reserved.
-Changes in Version 2.77_3 onwards Copyright (C) 2013-2014 Steve Hay. All rights
+Changes in Version 2.77_3 onwards Copyright (C) 2013-2015 Steve Hay. All rights
reserved.
-This program is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself.
+This module is free software; you can redistribute it and/or modify it under the
+same terms as Perl itself, i.e. under the terms of either the GNU General Public
+License or the Artistic License, as specified in the F<LICENCE> file.
=cut
diff --git a/Master/tlpkg/tlperl/lib/Net/FTP/A.pm b/Master/tlpkg/tlperl/lib/Net/FTP/A.pm
index 9f83e6c7909..cdbd7680e50 100644
--- a/Master/tlpkg/tlperl/lib/Net/FTP/A.pm
+++ b/Master/tlpkg/tlperl/lib/Net/FTP/A.pm
@@ -13,7 +13,7 @@ use Carp;
use Net::FTP::dataconn;
our @ISA = qw(Net::FTP::dataconn);
-our $VERSION = "3.05";
+our $VERSION = "3.08_01";
our $buf;
diff --git a/Master/tlpkg/tlperl/lib/Net/FTP/E.pm b/Master/tlpkg/tlperl/lib/Net/FTP/E.pm
index 1984a0e30bd..d3cb8207fb7 100644
--- a/Master/tlpkg/tlperl/lib/Net/FTP/E.pm
+++ b/Master/tlpkg/tlperl/lib/Net/FTP/E.pm
@@ -8,6 +8,6 @@ use warnings;
use Net::FTP::I;
our @ISA = qw(Net::FTP::I);
-our $VERSION = "3.05";
+our $VERSION = "3.08_01";
1;
diff --git a/Master/tlpkg/tlperl/lib/Net/FTP/I.pm b/Master/tlpkg/tlperl/lib/Net/FTP/I.pm
index c388d8fe8ac..3bd1c0fbe41 100644
--- a/Master/tlpkg/tlperl/lib/Net/FTP/I.pm
+++ b/Master/tlpkg/tlperl/lib/Net/FTP/I.pm
@@ -13,7 +13,7 @@ use Carp;
use Net::FTP::dataconn;
our @ISA = qw(Net::FTP::dataconn);
-our $VERSION = "3.05";
+our $VERSION = "3.08_01";
our $buf;
diff --git a/Master/tlpkg/tlperl/lib/Net/FTP/L.pm b/Master/tlpkg/tlperl/lib/Net/FTP/L.pm
index dda51c45fd0..630db0d0a8b 100644
--- a/Master/tlpkg/tlperl/lib/Net/FTP/L.pm
+++ b/Master/tlpkg/tlperl/lib/Net/FTP/L.pm
@@ -8,6 +8,6 @@ use warnings;
use Net::FTP::I;
our @ISA = qw(Net::FTP::I);
-our $VERSION = "3.05";
+our $VERSION = "3.08_01";
1;
diff --git a/Master/tlpkg/tlperl/lib/Net/FTP/dataconn.pm b/Master/tlpkg/tlperl/lib/Net/FTP/dataconn.pm
index eaa769d5d71..ba0891bdfcd 100644
--- a/Master/tlpkg/tlperl/lib/Net/FTP/dataconn.pm
+++ b/Master/tlpkg/tlperl/lib/Net/FTP/dataconn.pm
@@ -13,7 +13,7 @@ use Carp;
use Errno;
use Net::Cmd;
-our $VERSION = '3.05';
+our $VERSION = '3.08_01';
$Net::FTP::IOCLASS or die "please load Net::FTP before Net::FTP::dataconn";
our @ISA = $Net::FTP::IOCLASS;
diff --git a/Master/tlpkg/tlperl/lib/Net/NNTP.pm b/Master/tlpkg/tlperl/lib/Net/NNTP.pm
index 3796798cdd5..675b1e6a5c1 100644
--- a/Master/tlpkg/tlperl/lib/Net/NNTP.pm
+++ b/Master/tlpkg/tlperl/lib/Net/NNTP.pm
@@ -2,10 +2,11 @@
#
# Versions up to 2.24_1 Copyright (c) 1995-1997 Graham Barr <gbarr@pobox.com>.
# All rights reserved.
-# Changes in Version 2.25 onwards Copyright (C) 2013-2014 Steve Hay. All rights
+# Changes in Version 2.25 onwards Copyright (C) 2013-2015 Steve Hay. All rights
# reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
+# This module is free software; you can redistribute it and/or modify it under
+# the same terms as Perl itself, i.e. under the terms of either the GNU General
+# Public License or the Artistic License, as specified in the F<LICENCE> file.
package Net::NNTP;
@@ -20,7 +21,7 @@ use Net::Cmd;
use Net::Config;
use Time::Local;
-our $VERSION = "3.05";
+our $VERSION = "3.08_01";
# Code for detecting if we can use SSL
my $ssl_class = eval {
@@ -34,16 +35,19 @@ my $nossl_warn = !$ssl_class &&
'To use SSL please install IO::Socket::SSL with version>=2.007';
# Code for detecting if we can use IPv6
+my $family_key = 'Domain';
my $inet6_class = eval {
require IO::Socket::IP;
no warnings 'numeric';
- IO::Socket::IP->VERSION(0.20);
+ IO::Socket::IP->VERSION(0.20) || die;
+ $family_key = 'Family';
} && 'IO::Socket::IP' || eval {
require IO::Socket::INET6;
no warnings 'numeric';
IO::Socket::INET6->VERSION(2.62);
} && 'IO::Socket::INET6';
+
sub can_ssl { $ssl_class };
sub can_inet6 { $inet6_class };
@@ -80,9 +84,10 @@ sub new {
$connect{$_} = $arg{$_} for(grep { m{^SSL_} } keys %arg);
}
- foreach my $o (qw(LocalAddr Timeout)) {
+ foreach my $o (qw(LocalAddr LocalPort Timeout)) {
$connect{$o} = $arg{$o} if exists $arg{$o};
}
+ $connect{$family_key} = $arg{Domain} || $arg{Family};
$connect{Timeout} = 120 unless defined $connect{Timeout};
$connect{PeerPort} = $arg{Port} || 'nntp(119)';
foreach my $h (@{$hosts}) {
@@ -756,9 +761,9 @@ sub DESTROY {
my ($class,$nntp,%arg) = @_;
delete @arg{ grep { !m{^SSL_} } keys %arg };
( $arg{SSL_verifycn_name} ||= $nntp->host )
- =~s{(?<!:):[\w()]+$}{}; # strip port
+ =~s{(?<!:):[\w()]+$}{}; # strip port
$arg{SSL_hostname} = $arg{SSL_verifycn_name}
- if ! defined $arg{SSL_hostname} && $class->can_client_sni;
+ if ! defined $arg{SSL_hostname} && $class->can_client_sni;
my $ok = $class->SUPER::start_SSL($nntp,
SSL_verifycn_scheme => 'nntp',
%arg
@@ -798,8 +803,11 @@ Net::NNTP - NNTP Client class
C<Net::NNTP> is a class implementing a simple NNTP client in Perl as described
in RFC977 and RFC4642.
+With L<IO::Socket::SSL> installed it also provides support for implicit and
+explicit TLS encryption, i.e. NNTPS or NNTP+STARTTLS.
-The Net::NNTP class is a subclass of Net::Cmd and IO::Socket::INET.
+The Net::NNTP class is a subclass of Net::Cmd and (depending on avaibility) of
+IO::Socket::IP, IO::Socket::INET6 or IO::Socket::INET.
=head1 CONSTRUCTOR
@@ -842,10 +850,12 @@ so that the remote server becomes innd. If the C<Reader> option is given
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.
+B<LocalAddr> and B<LocalPort> - These parameters are passed directly
+to IO::Socket to allow binding the socket to a specific local address and port.
+
+B<Domain> - This parameter is passed directly to IO::Socket and makes it
+possible to enforce IPv4 connections even if L<IO::Socket::IP> is used as super
+class. Alternatively B<Family> can be used.
=back
@@ -946,15 +956,17 @@ implementation) from the server. Returns the text or undef upon failure.
The C<ihave> command informs the server that the client has an article
whose id is C<MSGID>. If the server desires a copy of that
-article, and C<MESSAGE> has been given the it will be sent.
+article and C<MESSAGE> has been given then it will be sent.
Returns I<true> if the server desires the article and C<MESSAGE> was
-successfully sent,if specified.
+successfully sent, if specified.
If C<MESSAGE> is not specified then the message must be sent using the
C<datasend> and C<dataend> methods from L<Net::Cmd>
-C<MESSAGE> can be either an array of lines or a reference to an array.
+C<MESSAGE> can be either an array of lines or a reference to an array
+and must be encoded by the caller to octets of whatever encoding is required,
+e.g. by using the Encode module's C<encode()> function.
=item last ()
@@ -1027,7 +1039,9 @@ is allowed then the message will be sent.
If C<MESSAGE> is not specified then the message must be sent using the
C<datasend> and C<dataend> methods from L<Net::Cmd>
-C<MESSAGE> can be either an array of lines or a reference to an array.
+C<MESSAGE> can be either an array of lines or a reference to an array
+and must be encoded by the caller to octets of whatever encoding is required,
+e.g. by using the Encode module's C<encode()> function.
The message, either sent via C<datasend> or as the C<MESSAGE>
parameter, must be in the format as described by RFC822 and must
@@ -1278,10 +1292,11 @@ Steve Hay E<lt>F<shay@cpan.org>E<gt> is now maintaining libnet as of version
=head1 COPYRIGHT
Versions up to 2.24_1 Copyright (c) 1995-1997 Graham Barr. All rights reserved.
-Changes in Version 2.25 onwards Copyright (C) 2013-2014 Steve Hay. All rights
+Changes in Version 2.25 onwards Copyright (C) 2013-2015 Steve Hay. All rights
reserved.
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
+This module is free software; you can redistribute it and/or modify it under the
+same terms as Perl itself, i.e. under the terms of either the GNU General Public
+License or the Artistic License, as specified in the F<LICENCE> file.
=cut
diff --git a/Master/tlpkg/tlperl/lib/Net/Netrc.pm b/Master/tlpkg/tlperl/lib/Net/Netrc.pm
index 9cf06b12bae..ba60ae6904e 100644
--- a/Master/tlpkg/tlperl/lib/Net/Netrc.pm
+++ b/Master/tlpkg/tlperl/lib/Net/Netrc.pm
@@ -4,8 +4,9 @@
# All rights reserved.
# Changes in Version 2.13_01 onwards Copyright (C) 2013-2014 Steve Hay. All
# rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
+# This module is free software; you can redistribute it and/or modify it under
+# the same terms as Perl itself, i.e. under the terms of either the GNU General
+# Public License or the Artistic License, as specified in the F<LICENCE> file.
package Net::Netrc;
@@ -17,7 +18,7 @@ use warnings;
use Carp;
use FileHandle;
-our $VERSION = "3.05";
+our $VERSION = "3.08_01";
our $TESTING;
@@ -339,7 +340,8 @@ Versions up to 2.13 Copyright (c) 1995-1998 Graham Barr. All rights reserved.
Changes in Version 2.13_01 onwards Copyright (C) 2013-2014 Steve Hay. All
rights reserved.
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
+This module is free software; you can redistribute it and/or modify it under the
+same terms as Perl itself, i.e. under the terms of either the GNU General Public
+License or the Artistic License, as specified in the F<LICENCE> file.
=cut
diff --git a/Master/tlpkg/tlperl/lib/Net/POP3.pm b/Master/tlpkg/tlperl/lib/Net/POP3.pm
index 0c6c4b1dc92..ab8121e6581 100644
--- a/Master/tlpkg/tlperl/lib/Net/POP3.pm
+++ b/Master/tlpkg/tlperl/lib/Net/POP3.pm
@@ -2,10 +2,11 @@
#
# Versions up to 2.29 Copyright (c) 1995-2004 Graham Barr <gbarr@pobox.com>.
# All rights reserved.
-# Changes in Version 2.29_01 onwards Copyright (C) 2013-2014 Steve Hay. All
+# Changes in Version 2.29_01 onwards Copyright (C) 2013-2015 Steve Hay. All
# rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
+# This module is free software; you can redistribute it and/or modify it under
+# the same terms as Perl itself, i.e. under the terms of either the GNU General
+# Public License or the Artistic License, as specified in the F<LICENCE> file.
package Net::POP3;
@@ -19,7 +20,7 @@ use IO::Socket;
use Net::Cmd;
use Net::Config;
-our $VERSION = "3.05";
+our $VERSION = "3.08_01";
# Code for detecting if we can use SSL
my $ssl_class = eval {
@@ -33,16 +34,19 @@ my $nossl_warn = !$ssl_class &&
'To use SSL please install IO::Socket::SSL with version>=2.007';
# Code for detecting if we can use IPv6
+my $family_key = 'Domain';
my $inet6_class = eval {
require IO::Socket::IP;
no warnings 'numeric';
- IO::Socket::IP->VERSION(0.20);
+ IO::Socket::IP->VERSION(0.20) || die;
+ $family_key = 'Family';
} && 'IO::Socket::IP' || eval {
require IO::Socket::INET6;
no warnings 'numeric';
IO::Socket::INET6->VERSION(2.62);
} && 'IO::Socket::INET6';
+
sub can_ssl { $ssl_class };
sub can_inet6 { $inet6_class };
@@ -62,7 +66,6 @@ sub new {
}
my $hosts = defined $host ? [$host] : $NetConfig{pop3_hosts};
my $obj;
- my @localport = exists $arg{ResvPort} ? (LocalPort => $arg{ResvPort}) : ();
if ($arg{SSL}) {
# SSL from start
@@ -77,7 +80,9 @@ sub new {
PeerAddr => ($host = $h),
PeerPort => $arg{Port} || 'pop3(110)',
Proto => 'tcp',
- @localport,
+ $family_key => $arg{Domain} || $arg{Family},
+ LocalAddr => $arg{LocalAddr},
+ LocalPort => exists($arg{ResvPort}) ? $arg{ResvPort} : $arg{LocalPort},
Timeout => $arg{Timeout},
)
and last;
@@ -577,9 +582,9 @@ sub banner {
my ($class,$pop3,%arg) = @_;
delete @arg{ grep { !m{^SSL_} } keys %arg };
( $arg{SSL_verifycn_name} ||= $pop3->host )
- =~s{(?<!:):[\w()]+$}{}; # strip port
+ =~s{(?<!:):[\w()]+$}{}; # strip port
$arg{SSL_hostname} = $arg{SSL_verifycn_name}
- if ! defined $arg{SSL_hostname} && $class->can_client_sni;
+ if ! defined $arg{SSL_hostname} && $class->can_client_sni;
$arg{SSL_verifycn_scheme} ||= 'pop3';
my $ok = $class->SUPER::start_SSL($pop3,%arg);
$@ = $ssl_class->errstr if !$ok;
@@ -622,12 +627,16 @@ Net::POP3 - Post Office Protocol 3 Client class (RFC1939)
This module implements a client interface to the POP3 protocol, enabling
a perl5 application to talk to POP3 servers. This documentation assumes
that you are familiar with the POP3 protocol described in RFC1939.
+With L<IO::Socket::SSL> installed it also provides support for implicit and
+explicit TLS encryption, i.e. POP3S or POP3+STARTTLS.
A new Net::POP3 object must be created with the I<new> method. Once
this has been done, all POP3 commands are accessed via method calls
on the object.
-The Net::POP3 class is a subclass of Net::Cmd and IO::Socket::INET.
+The Net::POP3 class is a subclass of Net::Cmd and (depending on avaibility) of
+IO::Socket::IP, IO::Socket::INET6 or IO::Socket::INET.
+
=head1 CONSTRUCTOR
@@ -658,9 +667,14 @@ upgrade with C<starttls>.
You can use SSL arguments as documented in L<IO::Socket::SSL>, but it will
usually use the right arguments already.
-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<LocalAddr> and B<LocalPort> - These parameters are passed directly
+to IO::Socket to allow binding the socket to a specific local address and port.
+For compatibility with older versions B<ResvPort> can be used instead of
+B<LocalPort>.
+
+B<Domain> - This parameter is passed directly to IO::Socket and makes it
+possible to enforce IPv4 connections even if L<IO::Socket::IP> is used as super
+class. Alternatively B<Family> can be used.
B<Timeout> - Maximum time, in seconds, to wait for a response from the
POP3 server (default: 120)
@@ -839,10 +853,11 @@ Steve Hay E<lt>F<shay@cpan.org>E<gt> is now maintaining libnet as of version
=head1 COPYRIGHT
Versions up to 2.29 Copyright (c) 1995-2004 Graham Barr. All rights reserved.
-Changes in Version 2.29_01 onwards Copyright (C) 2013-2014 Steve Hay. All
+Changes in Version 2.29_01 onwards Copyright (C) 2013-2015 Steve Hay. All
rights reserved.
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
+This module is free software; you can redistribute it and/or modify it under the
+same terms as Perl itself, i.e. under the terms of either the GNU General Public
+License or the Artistic License, as specified in the F<LICENCE> file.
=cut
diff --git a/Master/tlpkg/tlperl/lib/Net/Ping.pm b/Master/tlpkg/tlperl/lib/Net/Ping.pm
index 2766c9edbb5..86b0dfd3f51 100644
--- a/Master/tlpkg/tlperl/lib/Net/Ping.pm
+++ b/Master/tlpkg/tlperl/lib/Net/Ping.pm
@@ -17,7 +17,7 @@ use Time::HiRes;
@ISA = qw(Exporter);
@EXPORT = qw(pingecho);
-$VERSION = "2.43";
+$VERSION = "2.43_01";
# Constants
@@ -410,7 +410,11 @@ sub ping_external {
$timeout # Seconds after which ping times out
) = @_;
- eval { require Net::Ping::External; }
+ eval {
+ local @INC = @INC;
+ pop @INC if $INC[-1] eq '.';
+ require Net::Ping::External;
+ }
or croak('Protocol "external" not supported on your system: Net::Ping::External not found');
return Net::Ping::External::ping(ip => $ip, timeout => $timeout);
}
diff --git a/Master/tlpkg/tlperl/lib/Net/SMTP.pm b/Master/tlpkg/tlperl/lib/Net/SMTP.pm
index afd017aa0ef..0130a2fd64b 100644
--- a/Master/tlpkg/tlperl/lib/Net/SMTP.pm
+++ b/Master/tlpkg/tlperl/lib/Net/SMTP.pm
@@ -2,10 +2,11 @@
#
# Versions up to 2.31_1 Copyright (c) 1995-2004 Graham Barr <gbarr@pobox.com>.
# All rights reserved.
-# Changes in Version 2.31_2 onwards Copyright (C) 2013-2014 Steve Hay. All
+# Changes in Version 2.31_2 onwards Copyright (C) 2013-2015 Steve Hay. All
# rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
+# This module is free software; you can redistribute it and/or modify it under
+# the same terms as Perl itself, i.e. under the terms of either the GNU General
+# Public License or the Artistic License, as specified in the F<LICENCE> file.
package Net::SMTP;
@@ -20,7 +21,7 @@ use Net::Cmd;
use Net::Config;
use Socket;
-our $VERSION = "3.05";
+our $VERSION = "3.08_01";
# Code for detecting if we can use SSL
my $ssl_class = eval {
@@ -34,10 +35,12 @@ my $nossl_warn = !$ssl_class &&
'To use SSL please install IO::Socket::SSL with version>=2.007';
# Code for detecting if we can use IPv6
+my $family_key = 'Domain';
my $inet6_class = eval {
require IO::Socket::IP;
no warnings 'numeric';
- IO::Socket::IP->VERSION(0.20);
+ IO::Socket::IP->VERSION(0.20) || die;
+ $family_key = 'Family';
} && 'IO::Socket::IP' || eval {
require IO::Socket::INET6;
no warnings 'numeric';
@@ -79,6 +82,7 @@ sub new {
PeerPort => $arg{Port} || 'smtp(25)',
LocalAddr => $arg{LocalAddr},
LocalPort => $arg{LocalPort},
+ $family_key => $arg{Domain} || $arg{Family},
Proto => 'tcp',
Timeout => $arg{Timeout}
)
@@ -112,11 +116,13 @@ sub new {
(${*$obj}{'net_smtp_banner'}) = $obj->message;
(${*$obj}{'net_smtp_domain'}) = $obj->message =~ /\A\s*(\S+)/;
- unless ($obj->hello($arg{Hello} || "")) {
- my $err = ref($obj) . ": " . $obj->code . " " . $obj->message;
- $obj->close();
- $@ = $err;
- return;
+ if (!exists $arg{SendHello} || $arg{SendHello}) {
+ unless ($obj->hello($arg{Hello} || "")) {
+ my $err = ref($obj) . ": " . $obj->code . " " . $obj->message;
+ $obj->close();
+ $@ = $err;
+ return;
+ }
}
$obj;
@@ -615,9 +621,9 @@ sub _STARTTLS { shift->command("STARTTLS")->response() == CMD_OK }
my ($class,$smtp,%arg) = @_;
delete @arg{ grep { !m{^SSL_} } keys %arg };
( $arg{SSL_verifycn_name} ||= $smtp->host )
- =~s{(?<!:):[\w()]+$}{}; # strip port
+ =~s{(?<!:):[\w()]+$}{}; # strip port
$arg{SSL_hostname} = $arg{SSL_verifycn_name}
- if ! defined $arg{SSL_hostname} && $class->can_client_sni;
+ if ! defined $arg{SSL_hostname} && $class->can_client_sni;
$arg{SSL_verifycn_scheme} ||= 'smtp';
my $ok = $class->SUPER::start_SSL($smtp,%arg);
$@ = $ssl_class->errstr if !$ok;
@@ -648,12 +654,12 @@ Net::SMTP - Simple Mail Transfer Protocol Client
This module implements a client interface to the SMTP and ESMTP
protocol, enabling a perl5 application to talk to SMTP servers. This
documentation assumes that you are familiar with the concepts of the
-SMTP protocol described in RFC821.
-
-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.
+SMTP protocol described in RFC2821.
+With L<IO::Socket::SSL> installed it also provides support for implicit and
+explicit TLS encryption, i.e. SMTPS or SMTP+STARTTLS.
-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 (depending on avaibility) of
+IO::Socket::IP, IO::Socket::INET6 or IO::Socket::INET.
=head1 EXAMPLES
@@ -712,6 +718,10 @@ B<Hello> - SMTP requires that you identify yourself. This option
specifies a string to pass as your mail domain. If not given localhost.localdomain
will be used.
+B<SendHello> - If false then the EHLO (or HELO) command that is normally sent
+when constructing the object will not be sent. In that case the command will
+have to be sent manually by calling C<hello()> instead.
+
B<Host> - SMTP host to connect to. It may be a single scalar (hostname[:port]),
as defined for the C<PeerAddr> option in L<IO::Socket::INET>, or a reference to
an array with hosts to try in turn. The L</host> method will return the value
@@ -727,7 +737,11 @@ You can use SSL arguments as documented in L<IO::Socket::SSL>, but it will
usually use the right arguments already.
B<LocalAddr> and B<LocalPort> - These parameters are passed directly
-to IO::Socket to allow binding the socket to a local port.
+to IO::Socket to allow binding the socket to a specific local address and port.
+
+B<Domain> - This parameter is passed directly to IO::Socket and makes it
+possible to enforce IPv4 connections even if L<IO::Socket::IP> is used as super
+class. Alternatively B<Family> can be used.
B<Timeout> - Maximum time, in seconds, to wait for a response from the
SMTP server (default: 120)
@@ -758,11 +772,11 @@ Example:
# the same with direct SSL
$smtp = Net::SMTP->new('mailhost',
- Hello => 'my.mail.domain',
- Timeout => 30,
- Debug => 1,
- SSL => 1,
- );
+ Hello => 'my.mail.domain',
+ Timeout => 30,
+ Debug => 1,
+ SSL => 1,
+ );
# Connect to the default server from Net::config
$smtp = Net::SMTP->new(
@@ -819,7 +833,11 @@ usually use the right arguments already.
=item auth ( USERNAME, PASSWORD )
-Attempt SASL authentication. Requires Authen::SASL module.
+=item auth ( SASL )
+
+Attempt SASL authentication. Requires Authen::SASL module. The first form
+constructs a new Authen::SASL object using the given username and password;
+the second form uses the given Authen::SASL object.
=item mail ( ADDRESS [, OPTIONS] )
@@ -935,9 +953,12 @@ Synonyms for C<recipient>.
Initiate the sending of the data from the current message.
-C<DATA> may be a reference to a list or a list. If specified the contents
-of C<DATA> and a termination string C<".\r\n"> is sent to the server. And the
-result will be true if the data was accepted.
+C<DATA> may be a reference to a list or a list and must be encoded by the
+caller to octets of whatever encoding is required, e.g. by using the Encode
+module's C<encode()> function.
+
+If specified the contents of C<DATA> and a termination string C<".\r\n"> is
+sent to the server. The result will be true if the data was accepted.
If C<DATA> is not specified then the result will indicate that the server
wishes the data to be sent. The data must then be sent using the C<datasend>
@@ -1011,10 +1032,11 @@ Steve Hay E<lt>F<shay@cpan.org>E<gt> is now maintaining libnet as of version
=head1 COPYRIGHT
Versions up to 2.31_1 Copyright (c) 1995-2004 Graham Barr. All rights reserved.
-Changes in Version 2.31_2 onwards Copyright (C) 2013-2014 Steve Hay. All rights
+Changes in Version 2.31_2 onwards Copyright (C) 2013-2015 Steve Hay. All rights
reserved.
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
+This module is free software; you can redistribute it and/or modify it under the
+same terms as Perl itself, i.e. under the terms of either the GNU General Public
+License or the Artistic License, as specified in the F<LICENCE> file.
=cut
diff --git a/Master/tlpkg/tlperl/lib/Net/Time.pm b/Master/tlpkg/tlperl/lib/Net/Time.pm
index da259422cf8..6118ad19d1a 100644
--- a/Master/tlpkg/tlperl/lib/Net/Time.pm
+++ b/Master/tlpkg/tlperl/lib/Net/Time.pm
@@ -4,8 +4,9 @@
# All rights reserved.
# Changes in Version 2.11 onwards Copyright (C) 2014 Steve Hay. All rights
# reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
+# This module is free software; you can redistribute it and/or modify it under
+# the same terms as Perl itself, i.e. under the terms of either the GNU General
+# Public License or the Artistic License, as specified in the F<LICENCE> file.
package Net::Time;
@@ -23,7 +24,7 @@ use Net::Config;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(inet_time inet_daytime);
-our $VERSION = "3.05";
+our $VERSION = "3.08_01";
our $TIMEOUT = 120;
@@ -156,7 +157,8 @@ Versions up to 2.11 Copyright (c) 1995-2004 Graham Barr. All rights reserved.
Changes in Version 2.11 onwards Copyright (C) 2014 Steve Hay. All rights
reserved.
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
+This module is free software; you can redistribute it and/or modify it under the
+same terms as Perl itself, i.e. under the terms of either the GNU General Public
+License or the Artistic License, as specified in the F<LICENCE> file.
=cut