Re: [PATCH] send-email: remove documented requirement for Net::SMTP::SSL
Todd Zullinger <tmz@pobox.com> wrote:
Show 23 quoted lines
> I wonder if it's (separately from this change) worth
> adjusting the conditional which sets $use_net_smtp_ssl to
> use "Net::SMTP->can('starttls')" rather than a strict
> version check? (It might not be if using 'can' is too
> fragile or would only benefit the Red Hat 7 packages which
> likely won't officially be updated to a newer git with such
> a change.)
>
> Something like:
>
> diff --git i/git-send-email.perl w/git-send-email.perl
> index 24859a7bc3..84ac03994d 100755
> --- i/git-send-email.perl
> +++ w/git-send-email.perl
> @@ -1465,7 +1465,7 @@ sub send_message {
> }
>
> require Net::SMTP;
> - my $use_net_smtp_ssl = version->parse($Net::SMTP::VERSION) < version->parse("2.34");
> + my $use_net_smtp_ssl = Net::SMTP->can('starttls') ? 0 : 1;
> $smtp_domain ||= maildomain();
>
> if ($smtp_encryption eq 'ssl') {