1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-19 09:26:09 +02:00
git/perl/Git
Ævar Arnfjörð Bjarmason edfb7b92a1 perl: generalize the Git::LoadCPAN facility
Change the two wrappers that load from CPAN (local OS) or our own copy
to do so via the same codepath.

I added the Error.pm wrapper in 20d2a30f8f ("Makefile: replace
perl/Makefile.PL with simple make rules", 2017-12-10), and shortly
afterwards Matthieu Moy added a wrapper for Mail::Address in
bd869f67b9 ("send-email: add and use a local copy of Mail::Address",
2018-01-05).

His loader was simpler since Mail::Address doesn't have an "import"
method, but didn't do the same sanity checking; For example, a missing
FromCPAN directory (which OS packages are likely not to have) wouldn't
be explicitly warned about as a "BUG: ...".

Update both to use a common implementation based on the previous
Error.pm loader. Which has been amended to take the module to load as
parameter, as well as whether or not that module has an import
method.

This loader should be generic enough to handle almost all CPAN modules
out there, some use some crazy loading magic and wouldn't like being
wrapped like this, but that would be immediately obvious, and we'd
find out right away since the module wouldn't work at all.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-05 10:52:28 -08:00
..
FromCPAN perl: update our copy of Mail::Address 2018-03-05 10:52:28 -08:00
LoadCPAN perl: generalize the Git::LoadCPAN facility 2018-03-05 10:52:28 -08:00
SVN git-svn: allow "0" in SVN path components 2016-12-12 10:49:50 -08:00
I18N.pm Makefile: replace perl/Makefile.PL with simple make rules 2017-12-11 15:28:10 -08:00
IndexInfo.pm Move Git::IndexInfo into its own file. 2012-07-27 22:36:17 +00:00
LoadCPAN.pm perl: generalize the Git::LoadCPAN facility 2018-03-05 10:52:28 -08:00
Packet.pm Git/Packet.pm: use 'if' instead of 'unless' 2017-11-22 16:23:55 +09:00
SVN.pm git svn fetch: Create correct commit timestamp when using --localtime 2017-08-08 09:57:44 -07:00