PAYRE NATHAN p1508475 writes:
> Without the "print" used for testing.
But still smoe broken indentation:
> git-send-email.perl | 90
> +
> 1 file changed, 63 insertions(+), 27 deletions(-)
>
> diff --git a/git-send-email.perl b/git-send-ema
On Thu, Dec 7, 2017 at 12:02 AM, Nathan Payre
wrote:
> +sub parse_header_line {
> + my $lines = shift;
> + my $parsed_line = shift;
> +
> + foreach (split(/\n/, $lines)) {
> + if (/^(To|Cc|Bcc):\s*(.+)$/i) {
> + $parsed_line->{lc $1} = [ parse
The existing code mixes parsing of email header with regular
expression and actual code. Extract the parsing code into a new
subroutine 'parse_header_line()'. This improves the code readability
and make parse_header_line reusable in other place.
Signed-off-by: Nathan Payre
Signed-off-by: Matthieu
3 matches
Mail list logo