git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH 1/2] add a local copy of Mail::Address from CPAN

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jan 5, 2018, 14:19 UTC
Message-ID
<87shbkbd6r.fsf@evledraar.gmail.com>
In-Reply-To
<1515092151-14423-1-git-send-email-git@matthieu-moy.fr>
On Thu, Jan 04 2018, Matthieu Moy jotted:
> I looked at the perl/Git/Error.pm wrapper, and ended up writting a
> different, much simpler version. I'm not sure the same approach would
> apply to Error.pm, but my straightforward version does the job for
> Mail/Address.pm.

Yeah, yours is much simpler because Mail::Address doesn't have an import method, which is the entire complexity in the Error.pm wrapper.

I'll probably submit a wrapper-for-the-wrappers patch at some point after this gets in, i.e. both of these would become:

    package Git::Error;
    use Git::WrapCPAN 'Error';
    1;
    package Git::Mail::Address;
    use Git::WrapCPAN 'Mail::Address';
    1;

Then the Git::WrapCPAN package would do all the magic the Git::Error wrapper is doing now, but with a configurable package.

But this doesn't have to wait for that.
> I would also be fine with using our local copy unconditionaly.
Some notes on your patch:
 * If I comment out your whole eval/or-do I was puzzled because tests
   still pass, turns out the eval { require Email::Valid } will bring in
   Mail::Address from CPAN.
   Not a bug, just something to note for others poking at this.
 * You didn't update t/t9000/test.pl to use the wrapper, which I thought
   was a bug until I realized this is built on top of
   gitster/mm/send-email-fallback-to-local-mail-address.
Previous: Eric SunshineNext: Matthieu Moy
Message 10 of 22 in “add a local copy of Mail::Address from CPAN”
  1. 1/2 add a local copy of Mail::Address from CPANMatthieu Moy, Jan 4, 2018
  2. 2/2 Remove now useless email-address parsing codeMatthieu Moy, Jan 4, 2018
  3. Alex BennéeJan 4, 2018
  4. Matthieu MoyJan 5, 2018
  5. send-email: add test for Linux's get_maintainer.plMatthieu Moy, Jan 5, 2018
  6. Alex BennéeJan 5, 2018
  7. Matthieu MoyJan 5, 2018
  8. Junio C HamanoJan 5, 2018
  9. Eric SunshineJan 4, 2018
  10. Ævar Arnfjörð BjarmasonJan 5, 2018
  11. 1/3 send-email: add and use a local copy of Mail::AddressMatthieu Moy, Jan 5, 2018
  12. 2/3 Remove now useless email-address parsing codeMatthieu Moy, Jan 5, 2018
  13. 3/3 send-email: add test for Linux's get_maintainer.plMatthieu Moy, Jan 5, 2018
  14. Eric SunshineJan 5, 2018
  15. Matthieu MoyJan 8, 2018
  16. 1/3 send-email: add and use a local copy of Mail::AddressMatthieu Moy, Jan 8, 2018
  17. 3/3 send-email: add test for Linux's get_maintainer.plMatthieu Moy, Jan 8, 2018
  18. Junio C HamanoJan 8, 2018
  19. 2/3 Remove now useless email-address parsing codeMatthieu Moy, Jan 8, 2018
  20. Alex BennéeJan 8, 2018
  21. Alex BennéeJan 8, 2018
  22. Ævar Arnfjörð BjarmasonFeb 14, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.