Subject: send-email: Net::SMTP::starttls was introduced in v2.34
We cannot rely on the starttls method being present in Net::SMTP until
c274b798e6881a941d941808c6d89966975cb8c8 (Merge branch 'ipv6_ssl' of
https://github.com/noxxi/perl-libnet into noxxi-ipv6_ssl, 2014-06-02),
which set the module version to 2.34.
This version was first shipped as part of perl in v5.21.5~169 (Update
libnet to CPAN version 3.01, 2014-10-10).
Noticed on an Ubuntu system with perl 5.18.2-2ubuntu1.1, which
provides Net::SMTP version 2.31. The error message is
Can't locate object method "starttls" via package "Net::SMTP" at /usr/lib/git-core/git-send-email line 1410.
Reported-by: Brandon Williams <redacted>
Reported-and-tested-by: Eric Biggers <redacted>
Signed-off-by: Jonathan Nieder <redacted>
---
Jonathan Nieder wrote:
Thanks. Mining through https://github.com/gbarr/perl-libnet, I find
[...]
I think 2.35 is the correct minimum version.
Nah, I'm reading wrong. The relevant commit is c274b798 (Merge branch
'ipv6_ssl' of https://github.com/noxxi/perl-libnet into
noxxi-ipv6_ssl, 2014-06-02), which bumped VERSION to 2.34.
Here's an updated patch.
Thanks,
Jonathan
git-send-email.perl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 0d90439d9..d326238c0 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1354,7 +1354,7 @@ EOF
}
require Net::SMTP;
- my $use_net_smtp_ssl = version->parse($Net::SMTP::VERSION) < version->parse("1.28");
+ my $use_net_smtp_ssl = version->parse($Net::SMTP::VERSION) < version->parse("2.34");
$smtp_domain ||= maildomain();
if ($smtp_encryption eq 'ssl') {--
2.13.0.506.g27d5fe0cd