Re: [PATCH] send-email: extract email-parsing code into a subroutine
- From
Matthieu Moy <matthieu.moy@univ-lyon1.fr>
- Date
- Dec 15, 2017, 15:44 UTC
- Message-ID
- <q7h9lgi4m1w1.fsf@orange.lip.ens-lyon.fr>
- In-Reply-To
- <3cafddfe825a4fb4a554f02aa3c025a3@BPMBX2013-01.univ-lyon1.fr>
PAYRE NATHAN p1508475 <nathan.payre@etu.univ-lyon1.fr> writes:
Show 12 quoted lines
>>> +sub parse_header_line {
>>> + my $lines = shift;
>>> + my $parsed_line = shift;
>>> + my $pattern = join "|", qw(To Cc Bcc);
>>
>> Nit: you may want to rename it to something more explicit, like
>> $addr_headers_pat.
>
> I find "$addr_headers_pat" too long that's why I've choose rename it
> into "$addr_pat", in addition to that, because the variable is in the
> subroutine "parse_header_line" it does not require to include
> "headers" in the variable name.I suggested this name because $addr_pat seems to imply that this matches an address, while it matches the _name of headers_ containing address. But that's not terribly important, the meaning is clear by the context anyway.
All my previous remarks have been taken into account. This is now
Reviewed-by: Matthieu Moy <Matthieu.Moy@univ-lyon1.fr>
Thanks,
-- Matthieu Moy https://matthieu-moy.fr/