git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Todd Zullinger <tmz@pobox.com>, Chris Mayo <aklhfex@gmail.com>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Dennis Kaarsemaker <dennis@kaarsemaker.net>,
	git@vger.kernel.org
Subject: Re: [PATCH] send-email: remove documented requirement for Net::SMTP::SSL
Date: Tue, 28 May 2019 01:57:59 +0000	[thread overview]
Message-ID: <20190528015759.GA13521@dcvr> (raw)
In-Reply-To: <87h89fmjzc.fsf@evledraar.gmail.com>

Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> On Tue, May 28 2019, Eric Wong wrote:
> > Todd Zullinger <tmz@pobox.com> wrote:
> >> 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') {
> >
> > Looks much better to me.
> 
> Same, but to bikeshed a bit, at this point we can just do:
>     
>     diff --git a/git-send-email.perl b/git-send-email.perl
>     index 24859a7bc3..4ad2091a49 100755
>     --- a/git-send-email.perl
>     +++ b/git-send-email.perl
>     @@ -1468 +1467,0 @@ sub send_message {
>     -               my $use_net_smtp_ssl = version->parse($Net::SMTP::VERSION) < version->parse("2.34");
>     @@ -1485 +1484 @@ sub send_message {
>     -                       if ($use_net_smtp_ssl) {
>     +                       if (Net::SMTP->can('starttls')) {
>     @@ -1507 +1506 @@ sub send_message {
>     -                               if ($use_net_smtp_ssl) {
>     +                               if (Net::SMTP->can('starttls')) {

Higher probability of a typo slipping through the cracks, though :)

(I was just bit by a similar case with hashes that would've been
 caught by "use fields")

      parent reply	other threads:[~2019-05-28  1:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-26 17:22 [PATCH] send-email: remove documented requirement for Net::SMTP::SSL Chris Mayo
2019-05-27 19:35 ` Eric Wong
2019-05-27 20:36   ` Ævar Arnfjörð Bjarmason
2019-05-27 23:43     ` brian m. carlson
2019-05-28  2:17       ` Ævar Arnfjörð Bjarmason
2019-05-28  1:22     ` Eric Wong
2019-05-28  0:05   ` Todd Zullinger
2019-05-28  1:31     ` Eric Wong
2019-05-28  1:43       ` Ævar Arnfjörð Bjarmason
2019-05-28  1:56         ` Todd Zullinger
2019-05-28  1:57         ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190528015759.GA13521@dcvr \
    --to=e@80x24.org \
    --cc=aklhfex@gmail.com \
    --cc=avarab@gmail.com \
    --cc=dennis@kaarsemaker.net \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=tmz@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).