Re: [PATCH] git-send-email.perl - Fix 550 EHLO argument does not match calling host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jakub Narebski <jnareb@xxxxxxxxx> writes:

> Why this duplication?  You have 'eval unless eval unless', with 
> 'eval unless' twice.

A typo after rafactoring the function into 3. Thanks.

>
>> +		    my $domain = Net::Domain::domainname();
>> +		    $maildomain = $domain
>> +			    unless $^O eq 'darwin' && $domain =~ /\.local$/;
>
> I'd like to have a comment about the above line: why it is necessary?

I have no idea. It is used in Perl library Test::Reporter, so I trust it
is necessary for MAC OSX.

>> +	$maildomain;

> It is a matter of style, but unless function is a very simple one, the
> preferred way is to use explicit return statement, i.e.
>
>    	return $maildomain;

In Perl, the last statement's result is the returned value from a
function. Compare:

    $ perl -e 'print  if $_ = do{ 1; }'
    1

Yes, it's a style issue. I don't personally use "return" at the end of
simple functions in Perl.

I'll add the "return".
Jari

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]