summaryrefslogtreecommitdiff
path: root/cpan/libnet
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2015-06-05 08:46:51 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2015-06-05 08:46:51 +0100
commita4f8ff4607cb674cb0c6feeb56b8eb80bbe28259 (patch)
tree86abe63a60e6e58ddd06f501cf8319d0b0fdea37 /cpan/libnet
parent99527ef152b4e2e3b029babe6e41c46c37429bf7 (diff)
downloadperl-a4f8ff4607cb674cb0c6feeb56b8eb80bbe28259.tar.gz
Upgrade libnet from version 3.05 to 3.06
Diffstat (limited to 'cpan/libnet')
-rw-r--r--cpan/libnet/Makefile.PL23
-rw-r--r--cpan/libnet/lib/Net/Cmd.pm12
-rw-r--r--cpan/libnet/lib/Net/Config.pm24
-rw-r--r--cpan/libnet/lib/Net/Domain.pm12
-rw-r--r--cpan/libnet/lib/Net/FTP.pm40
-rw-r--r--cpan/libnet/lib/Net/FTP/A.pm2
-rw-r--r--cpan/libnet/lib/Net/FTP/E.pm2
-rw-r--r--cpan/libnet/lib/Net/FTP/I.pm2
-rw-r--r--cpan/libnet/lib/Net/FTP/L.pm2
-rw-r--r--cpan/libnet/lib/Net/FTP/dataconn.pm2
-rw-r--r--cpan/libnet/lib/Net/NNTP.pm16
-rw-r--r--cpan/libnet/lib/Net/Netrc.pm12
-rw-r--r--cpan/libnet/lib/Net/POP3.pm16
-rw-r--r--cpan/libnet/lib/Net/SMTP.pm42
-rw-r--r--cpan/libnet/lib/Net/Time.pm12
-rw-r--r--cpan/libnet/t/nntp_ssl.t4
-rw-r--r--cpan/libnet/t/pop3_ipv6.t2
-rw-r--r--cpan/libnet/t/pop3_ssl.t8
-rw-r--r--cpan/libnet/t/smtp_ipv6.t2
-rw-r--r--cpan/libnet/t/smtp_ssl.t8
20 files changed, 149 insertions, 94 deletions
diff --git a/cpan/libnet/Makefile.PL b/cpan/libnet/Makefile.PL
index db7cfe2c15..af2497645a 100644
--- a/cpan/libnet/Makefile.PL
+++ b/cpan/libnet/Makefile.PL
@@ -10,8 +10,10 @@
# Copyright (C) 2014 Steve Hay. All rights reserved.
#
# LICENCE
-# You may distribute under the terms of either the GNU General Public License
-# or the Artistic License, as specified in the LICENCE file.
+# This script 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 LICENCE
+# file.
#
#===============================================================================
@@ -64,7 +66,7 @@ MAIN: {
ABSTRACT => 'Collection of network protocol modules',
AUTHOR => 'Graham Barr <gbarr@pobox.com>, Steve Hay <shay@cpan.org>',
LICENSE => 'perl_5',
- VERSION => '3.05',
+ VERSION => '3.06',
META_MERGE => {
'meta-spec' => {
@@ -125,6 +127,17 @@ MAIN: {
}
},
+ changestest => {
+ description => 'Changes testing',
+ prereqs => {
+ test => {
+ requires => {
+ 'Test::CPAN::Changes' => '0'
+ }
+ }
+ }
+ },
+
critictest => {
description => 'Perl::Critic testing',
prereqs => {
@@ -165,7 +178,7 @@ MAIN: {
CONFIGURE_REQUIRES => {
'ExtUtils::MakeMaker' => '6.64',
'Getopt::Std' => '0',
- 'IO:File' => '0',
+ 'IO::File' => '0',
'perl' => '5.008001',
'strict' => '0',
'vars' => '0',
@@ -196,7 +209,7 @@ MAIN: {
'vars' => '0'
},
- INSTALLDIRS => 'perl',
+ INSTALLDIRS => ($] >= 5.008 && $] < 5.011) ? 'perl' : 'site',
realclean => {
FILES => $CfgFile
diff --git a/cpan/libnet/lib/Net/Cmd.pm b/cpan/libnet/lib/Net/Cmd.pm
index 2614e69539..f56e9045da 100644
--- a/cpan/libnet/lib/Net/Cmd.pm
+++ b/cpan/libnet/lib/Net/Cmd.pm
@@ -4,8 +4,9 @@
# 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.
package Net::Cmd;
@@ -41,7 +42,7 @@ BEGIN {
}
}
-our $VERSION = "3.05";
+our $VERSION = "3.06";
our @ISA = qw(Exporter);
our @EXPORT = qw(CMD_INFO CMD_OK CMD_MORE CMD_REJECT CMD_ERROR CMD_PENDING);
@@ -870,7 +871,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/cpan/libnet/lib/Net/Config.pm b/cpan/libnet/lib/Net/Config.pm
index 953a826a68..a705065b06 100644
--- a/cpan/libnet/lib/Net/Config.pm
+++ b/cpan/libnet/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,7 +20,7 @@ use Socket qw(inet_aton inet_ntoa);
our @EXPORT = qw(%NetConfig);
our @ISA = qw(Net::LocalCfg Exporter);
-our $VERSION = "3.05";
+our $VERSION = "3.06";
our($CONFIGURE, $LIBNET_CFG);
@@ -319,4 +320,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/cpan/libnet/lib/Net/Domain.pm b/cpan/libnet/lib/Net/Domain.pm
index 3b274a66cf..0fde92dcb0 100644
--- a/cpan/libnet/lib/Net/Domain.pm
+++ b/cpan/libnet/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.06";
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/cpan/libnet/lib/Net/FTP.pm b/cpan/libnet/lib/Net/FTP.pm
index c791fac502..8b746632d5 100644
--- a/cpan/libnet/lib/Net/FTP.pm
+++ b/cpan/libnet/lib/Net/FTP.pm
@@ -4,8 +4,9 @@
# All rights reserved.
# Changes in Version 2.77_3 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.
#
# Documentation (at end) improved 1996 by Nathan Torkington <gnat@frii.com>.
@@ -24,7 +25,7 @@ use Net::Config;
use Socket;
use Time::Local;
-our $VERSION = '3.05';
+our $VERSION = '3.06';
our $IOCLASS;
BEGIN {
@@ -452,7 +453,7 @@ sub authorize {
my $ok = $ftp->_AUTH($auth || "");
- $ok = $ftp->_RESP($resp || "")
+ return $ftp->_RESP($resp || "")
if ($ok == CMD_MORE);
$ok == CMD_OK;
@@ -889,8 +890,8 @@ sub _eprt {
Timeout => $ftp->timeout,
LocalAddr => $ftp->sockhost,
can_ssl() ? (
- %{ ${*$ftp}{net_ftp_tlsargs} },
- SSL_startHandshake => 0,
+ %{ ${*$ftp}{net_ftp_tlsargs} },
+ SSL_startHandshake => 0,
):(),
);
${*$ftp}{net_ftp_intern_port} = 1;
@@ -1036,15 +1037,15 @@ sub _dataconn {
LocalAddr => ${*$ftp}{net_ftp_localaddr},
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 +1142,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/;
return $data;
}
$data->_close if $data;
@@ -1839,6 +1840,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 +1848,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).
@@ -2014,7 +2017,8 @@ 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
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/cpan/libnet/lib/Net/FTP/A.pm b/cpan/libnet/lib/Net/FTP/A.pm
index 9f83e6c790..7eee970d88 100644
--- a/cpan/libnet/lib/Net/FTP/A.pm
+++ b/cpan/libnet/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.06";
our $buf;
diff --git a/cpan/libnet/lib/Net/FTP/E.pm b/cpan/libnet/lib/Net/FTP/E.pm
index 1984a0e30b..ad36441906 100644
--- a/cpan/libnet/lib/Net/FTP/E.pm
+++ b/cpan/libnet/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.06";
1;
diff --git a/cpan/libnet/lib/Net/FTP/I.pm b/cpan/libnet/lib/Net/FTP/I.pm
index c388d8fe8a..c5603c67cd 100644
--- a/cpan/libnet/lib/Net/FTP/I.pm
+++ b/cpan/libnet/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.06";
our $buf;
diff --git a/cpan/libnet/lib/Net/FTP/L.pm b/cpan/libnet/lib/Net/FTP/L.pm
index dda51c45fd..4c5297010e 100644
--- a/cpan/libnet/lib/Net/FTP/L.pm
+++ b/cpan/libnet/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.06";
1;
diff --git a/cpan/libnet/lib/Net/FTP/dataconn.pm b/cpan/libnet/lib/Net/FTP/dataconn.pm
index eaa769d5d7..980e21d383 100644
--- a/cpan/libnet/lib/Net/FTP/dataconn.pm
+++ b/cpan/libnet/lib/Net/FTP/dataconn.pm
@@ -13,7 +13,7 @@ use Carp;
use Errno;
use Net::Cmd;
-our $VERSION = '3.05';
+our $VERSION = '3.06';
$Net::FTP::IOCLASS or die "please load Net::FTP before Net::FTP::dataconn";
our @ISA = $Net::FTP::IOCLASS;
diff --git a/cpan/libnet/lib/Net/NNTP.pm b/cpan/libnet/lib/Net/NNTP.pm
index 3796798cdd..75f7bf1dd4 100644
--- a/cpan/libnet/lib/Net/NNTP.pm
+++ b/cpan/libnet/lib/Net/NNTP.pm
@@ -4,8 +4,9 @@
# All rights reserved.
# Changes in Version 2.25 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::NNTP;
@@ -20,7 +21,7 @@ use Net::Cmd;
use Net::Config;
use Time::Local;
-our $VERSION = "3.05";
+our $VERSION = "3.06";
# Code for detecting if we can use SSL
my $ssl_class = eval {
@@ -756,9 +757,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
@@ -1281,7 +1282,8 @@ 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
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/cpan/libnet/lib/Net/Netrc.pm b/cpan/libnet/lib/Net/Netrc.pm
index 9cf06b12ba..efa38cb84c 100644
--- a/cpan/libnet/lib/Net/Netrc.pm
+++ b/cpan/libnet/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.06";
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/cpan/libnet/lib/Net/POP3.pm b/cpan/libnet/lib/Net/POP3.pm
index 0c6c4b1dc9..2c38819f98 100644
--- a/cpan/libnet/lib/Net/POP3.pm
+++ b/cpan/libnet/lib/Net/POP3.pm
@@ -4,8 +4,9 @@
# All rights reserved.
# Changes in Version 2.29_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::POP3;
@@ -19,7 +20,7 @@ use IO::Socket;
use Net::Cmd;
use Net::Config;
-our $VERSION = "3.05";
+our $VERSION = "3.06";
# Code for detecting if we can use SSL
my $ssl_class = eval {
@@ -577,9 +578,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;
@@ -842,7 +843,8 @@ 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
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/cpan/libnet/lib/Net/SMTP.pm b/cpan/libnet/lib/Net/SMTP.pm
index afd017aa0e..05f251996c 100644
--- a/cpan/libnet/lib/Net/SMTP.pm
+++ b/cpan/libnet/lib/Net/SMTP.pm
@@ -4,8 +4,9 @@
# All rights reserved.
# Changes in Version 2.31_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.
package Net::SMTP;
@@ -20,7 +21,7 @@ use Net::Cmd;
use Net::Config;
use Socket;
-our $VERSION = "3.05";
+our $VERSION = "3.06";
# Code for detecting if we can use SSL
my $ssl_class = eval {
@@ -112,11 +113,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 +618,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;
@@ -712,6 +715,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
@@ -758,11 +765,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(
@@ -1014,7 +1021,8 @@ 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
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/cpan/libnet/lib/Net/Time.pm b/cpan/libnet/lib/Net/Time.pm
index da259422cf..eea2e71319 100644
--- a/cpan/libnet/lib/Net/Time.pm
+++ b/cpan/libnet/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.06";
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
diff --git a/cpan/libnet/t/nntp_ssl.t b/cpan/libnet/t/nntp_ssl.t
index 387899fabd..e6a4fe5f23 100644
--- a/cpan/libnet/t/nntp_ssl.t
+++ b/cpan/libnet/t/nntp_ssl.t
@@ -115,8 +115,8 @@ sub nntp_server {
} elsif ( ! $ssl and $cmd eq 'STARTTLS' ) {
print $cl "382 Continue with TLS negotiation\r\n";
if ( ! IO::Socket::SSL->start_SSL($cl, %sslargs)) {
- diag("initial ssl handshake with client failed");
- return;
+ diag("initial ssl handshake with client failed");
+ return;
}
$ssl = 1;
} else {
diff --git a/cpan/libnet/t/pop3_ipv6.t b/cpan/libnet/t/pop3_ipv6.t
index 5100951e97..1c88c1a0ca 100644
--- a/cpan/libnet/t/pop3_ipv6.t
+++ b/cpan/libnet/t/pop3_ipv6.t
@@ -55,7 +55,7 @@ sub pop3_server {
last;
} elsif ( $cmd eq 'CAPA' ) {
print $cl "+OK\r\n".
- ".\r\n";
+ ".\r\n";
} else {
diag("received unknown command: $cmd");
print "-ERR unknown cmd\r\n";
diff --git a/cpan/libnet/t/pop3_ssl.t b/cpan/libnet/t/pop3_ssl.t
index 3eca064e86..356de40acb 100644
--- a/cpan/libnet/t/pop3_ssl.t
+++ b/cpan/libnet/t/pop3_ssl.t
@@ -106,13 +106,13 @@ sub pop3_server {
last;
} elsif ( $cmd eq 'CAPA' ) {
print $cl "+OK\r\n".
- ( $ssl ? "" : "STLS\r\n" ).
- ".\r\n";
+ ( $ssl ? "" : "STLS\r\n" ).
+ ".\r\n";
} elsif ( ! $ssl and $cmd eq 'STLS' ) {
print $cl "+OK starting ssl\r\n";
if ( ! IO::Socket::SSL->start_SSL($cl, %sslargs)) {
- diag("initial ssl handshake with client failed");
- return;
+ diag("initial ssl handshake with client failed");
+ return;
}
$ssl = 1;
} else {
diff --git a/cpan/libnet/t/smtp_ipv6.t b/cpan/libnet/t/smtp_ipv6.t
index 48c7246c1b..a31b6ff48c 100644
--- a/cpan/libnet/t/smtp_ipv6.t
+++ b/cpan/libnet/t/smtp_ipv6.t
@@ -57,7 +57,7 @@ sub smtp_server {
print $cl "250 localhost\r\n";
} elsif ( $cmd eq 'EHLO' ) {
print $cl "250-localhost\r\n".
- "250 HELP\r\n";
+ "250 HELP\r\n";
} else {
diag("received unknown command: $cmd");
print "500 unknown cmd\r\n";
diff --git a/cpan/libnet/t/smtp_ssl.t b/cpan/libnet/t/smtp_ssl.t
index e91cc9b668..7290176b23 100644
--- a/cpan/libnet/t/smtp_ssl.t
+++ b/cpan/libnet/t/smtp_ssl.t
@@ -108,13 +108,13 @@ sub smtp_server {
print $cl "250 localhost\r\n";
} elsif ( $cmd eq 'EHLO' ) {
print $cl "250-localhost\r\n".
- ( $ssl ? "" : "250-STARTTLS\r\n" ).
- "250 HELP\r\n";
+ ( $ssl ? "" : "250-STARTTLS\r\n" ).
+ "250 HELP\r\n";
} elsif ( ! $ssl and $cmd eq 'STARTTLS' ) {
print $cl "250 starting ssl\r\n";
if ( ! IO::Socket::SSL->start_SSL($cl, %sslargs)) {
- diag("initial ssl handshake with client failed");
- return;
+ diag("initial ssl handshake with client failed");
+ return;
}
$ssl = 1;
} else {