From: Jari Aalto <jari.aalto@cante•net>
To: git@vger•kernel.org
Subject: Re: [PATCH] git-send-email.perl - Fix 550 EHLO argument does not match calling host
Date: Sun, 14 Mar 2010 16:41:26 +0200 [thread overview]
Message-ID: <87pr37c6eh.fsf@jondo.cante.net> (raw)
In-Reply-To: 7vljdvp16n.fsf@alter.siamese.dyndns.org
Junio C Hamano <gitster@pobox•com> writes:
> Jari Aalto <jari.aalto@cante•net> writes:
>
>> +sub maildomain_net
>> +{
>> + my $maildomain;
>> + eval "use Net::Domain";
>> +
>> + unless ($@) {
>> + eval "use Net::Domain";
>> + unless ($@) {
>
> Sorry, but I don't understand the reason why you need to check the same
> thing twice. The original you borrowed from seems to be much cleanly
> written; it essentially boils down to:
>
> if (eval "require Net::Domain") {
> my $domain = Net::Domain::Domainname();
> ...
> }
>
> without need for separate "unless ($@)", nor doubly nested construct.
Code written like that inside if-statements is pretty bad IMHO. It is
very debuggable, whereas using variables would be:
>> + eval "use Net::Domain";
>> +
Debug("use Net::Domain", $@);
>> + unless ($@) {
But that's my code to maintain, I'll do what is needed.
Jari
next prev parent reply other threads:[~2010-03-14 14:41 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-10 15:57 [PATCH] Do not strip empty lines / trailing spaces from a commit message template Sebastian Schuberth
2010-03-11 8:12 ` Jeff King
2010-03-11 8:31 ` Jeff King
2010-03-11 20:46 ` Junio C Hamano
2010-03-11 22:46 ` Jeff King
2010-03-12 5:54 ` Junio C Hamano
2010-03-12 17:07 ` Sebastian Schuberth
2010-03-12 23:13 ` Junio C Hamano
2010-03-13 17:36 ` [PATCH] git-send-email.perl - Fix 550 EHLO argument does not match calling host Jari Aalto
2010-03-13 22:32 ` Junio C Hamano
2010-03-13 23:56 ` Jari Aalto
2010-03-14 6:28 ` Junio C Hamano
2010-03-14 10:19 ` Jari Aalto
2010-03-14 12:09 ` Junio C Hamano
2010-03-14 14:55 ` Jari Aalto
2010-03-14 14:59 ` Jari Aalto
2010-03-14 10:21 ` Jari Aalto
2010-03-14 11:55 ` Junio C Hamano
2010-03-14 14:41 ` Jari Aalto [this message]
2010-03-14 15:03 ` Jari Aalto
2010-03-14 13:17 ` Jakub Narebski
2010-03-14 14:52 ` Jari Aalto
2010-03-14 15:15 ` [PATCH 1/3] git-send-email.perl: improve error message in send_message() Jari Aalto
2010-03-14 15:16 ` [PATCH 2/3] git-send-email.perl: add option --smtp-debug Jari Aalto
2010-03-14 15:16 ` [PATCH 3/3] git-send-email.perl - Fix 550 EHLO argument does not match calling host Jari Aalto
2010-03-14 19:53 ` Jakub Narebski
2010-03-14 20:20 ` Jari Aalto
2010-03-14 20:33 ` [PATCH] " Jari Aalto
-- strict thread matches above, loose matches on Subject: below --
2010-03-12 20:07 [PATCH] git-send-email.perl: improve error message in send_message() Jari Aalto
2010-03-12 21:53 ` [PATCH] git-send-email.perl: add option --smtp-debug Jari Aalto
2010-03-12 23:04 ` [PATCH] git-send-email.perl - Fix 550 EHLO argument does not match calling host Jari Aalto
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pr37c6eh.fsf@jondo.cante.net \
--to=jari.aalto@cante$(echo .)net \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox