Re: [PATCH 1/4] send-email: Change from Mail::Sendmail to Net::SMTP

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

 



Ryan Anderson <ryan@xxxxxxxxxxxxxx> wrote:
> On Sat, Mar 25, 2006 at 02:43:30AM -0800, Eric Wong wrote:
> > Net::SMTP is in the base Perl distribution, so users are more
> > likely to have it.  Net::SMTP also allows reusing the SMTP
> > connection, so sending multiple emails is faster.
> 
> Overall, I like this set of cleanups, just one thing struck me as,
> "why?"
> 
> >  	if ($quiet) {
> > -		printf "Sent %s\n", $subject;
> > +		print "Sent $subject\n";
> 
> This seems to be a pointless change, and actually, might be long-term
> counterproductive.

Force of habit, I think.  I originally rewrote that portion but thought
I reverted it back to the way it was.  Besides, it's even slightly
faster this way :)  It could still be faster(!) if I just printed a list
(like below).

> Assumption: Eventually, we're going to want to internationalize git.
> 
> If that is true, we'll eventually do something like this to lines like
> that:
> 	printf( gettext("Send %s\n"), $subject);
> 
> The alternative:
> 	print gettext("Send $subject\n");
> does not work.

print gettext('Send '),$subject,"\n";

> (The line that xgettext will see is 'Send $subject\n', but when the
> program actually runs, gettext will see the interpolated version, which
> fails.)
> 
> Internationalization may still be a ways off, but I think we're reaching
> the point where it might be something we care to think about.

-- 
Eric Wong
-
: 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]