Re: send-email: Net::SMTP::SSL failure
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 9, 2017, 16:37 UTC
- Message-ID
- <xmqqvao55d8v.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CACBZZX6AKYA5PmE6Le4cxCTCOOix1ErHyT21C=L83CQBYaN=RQ@mail.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 21 quoted lines
> I have not looked deeply at this, but the error you're getting means
> "we tried to load it before and failed, and here you are trying
> again".
>
> This is almost definitely due to this line in git-send-email:
>
> if (eval { require Net::SMTP; 1 }) {
>
> And more generally, this code is all buggy:
>
> 4 matches for "eval.*require" in buffer: git-send-email.perl
> 153:my $have_email_valid = eval { require Email::Valid; 1 };
> 154:my $have_mail_address = eval { require Mail::Address; 1 };
> 1118: if (eval { require Net::Domain; 1 }) {
> 1129: if (eval { require Net::SMTP; 1 }) {
>
> Well, "buggy" in the sense that we're just happy-go-lucky trying to
> load these modules, and if they have an error we don't report it, then
> when we try to load them again perl just emits a generic error saying
> you're trying to require() something that already failed somewhere
> before...Thanks for the discussion. My short summary from reading the thread from the sideline is:
* "eval { require module; 1 }" pattern seems to have spread by
copying and pasting without thinking, all of which should be
corrected not to retry;* The error OP encountered is not an issue in git-send-email per-se, but was made harder to diagnose due to the above.
I think we still lack the definite "here is the right way to fix these not to retry" patch for application, but anything else I missed?