From: l.stelmach@samsung•com (Łukasz Stelmach)
To: git@vger•kernel.org
Subject: Re: [PATCH] send-email: support NNTP
Date: Thu, 25 Apr 2013 08:56:26 +0200 [thread overview]
Message-ID: <87sj2fhzdx.fsf@samsung.com> (raw)
In-Reply-To: 7vip3bgax9.fsf@alter.siamese.dyndns.org
It was <2013-04-24 śro 18:17>, when Junio C Hamano wrote:
> l.stelmach@samsung•com (Łukasz Stelmach) writes:
>
>> It was <2013-04-23 wto 17:02>, when Junio C Hamano wrote:
>>> Łukasz Stelmach <l.stelmach@samsung•com> writes:
>>>
>>>> Enable sending patches to NNTP servers (Usenet, Gmane).
>>>> ---
>>>>
>>>> The patch implements support for sending messages to groups on NNTP
>>>> serviers.
>>>
>>> Cute.
>>>
>>> A Perl guru might want to encapsulate the differences between $smtp
>>> and $nntp codepaths into two Perl modules, but it looks like a good
>>> starting point.
>>
>> You mean *one* perl module like Git::EmailTransport which hides the
>> differences.
>
> What I meant was one class to handle SMTP and another for NNTP.
>
> You look at the --protocol option, choose one of these classes, and
> initialize an instance of the chosen class.
>
> You can ask the chosen class to instantiate an instance without
> if/else cascade like this:
>
> +
> +# Transport specific setup
> +my ($email_authuser, $email_authpass);
> +if ($email_protocol eq 'nntp') {
> + $email_authuser = $nntp_authuser;
> + $email_authuser = $nntp_authuser;
> + @initial_to = @initial_cc = @bcclist = ();
> + $to_cmd = $cc_cmd = undef;
> + $no_cc = $no_bcc = 1;
> +} else {
> + $email_authuser = $smtp_authuser;
> + $email_authpass = $smtp_authpass;
> + $newsgroups_cmd = undef;
> +}
> +
[...]
OK, I see. Good point. Where would you recommend me to put these modules
and how to name them? I mean I don't want to make to much mess here (;
--
Łukasz Stelmach
Software wizzard
Samsung Poland R&D Center
next prev parent reply other threads:[~2013-04-25 6:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-23 11:13 [PATCH] send-email: support NNTP Łukasz Stelmach
2013-04-23 15:02 ` Junio C Hamano
2013-04-24 7:31 ` Łukasz Stelmach
2013-04-24 16:17 ` Junio C Hamano
2013-04-25 6:56 ` Łukasz Stelmach [this message]
2013-04-25 16:54 ` Junio C Hamano
2013-04-25 17:35 ` Junio C Hamano
2013-04-24 7:19 ` Eric Sunshine
2013-04-24 7:30 ` Łukasz Stelmach
2013-04-24 7:38 ` Thomas Rast
2013-04-24 8:42 ` Łukasz Stelmach
2013-04-24 9:29 ` Thomas Rast
2013-04-24 22:41 ` Junio C Hamano
2013-04-25 7:02 ` Łukasz Stelmach
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=87sj2fhzdx.fsf@samsung.com \
--to=l.stelmach@samsung$(echo .)com \
--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