From: Jari Aalto Date: Sun, 14 Mar 2010 15:03:16 GMT Subject: Re: [PATCH] git-send-email.perl - Fix 550 EHLO argument does not match calling host Message-ID: <87634zc5e3.fsf@jondo.cante.net> In-Reply-To: <7vljdvp16n.fsf@alter.siamese.dyndns.org> Junio C Hamano writes: > if (eval "require Net::Domain") { Refactored. >> +{ >> + my $mail_domain_system; # Static variable > > This, and ... Refactored. > >> @@ -917,6 +988,8 @@ X-Mailer: git-send-email $gitversion >> } >> } >> >> + my $maildomain; >> + Refactored. > >> @@ -962,9 +1040,10 @@ X-Mailer: git-send-email $gitversion >> } >> >> if (!$smtp) { >> - die "Unable to initialize SMTP properly. Check config. ", >> + die "Unable to initialize SMTP properly. Check config and use --smtp-debug. ", >> "VALUES: server=$smtp_server ", >> "encryption=$smtp_encryption ", >> + "maildomain=$maildomain", > > You said you needed a separate local variable for reporting but that > doesn't explain why you need three redundant variables. Why can't the > code look like this? Refactored. > > - once set, ||= ensures that it will we used without needing to Refactored. Jari