summaryrefslogtreecommitdiff
path: root/repository.c
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2018-03-03 15:38:14 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-03-05 10:52:28 -0800
commitedfb7b92a1dbd70858ea5c5356cdb6dc14ec8d3a (patch)
treebb2629f345fec7f6c66834bdb6f503d6eb243e37 /repository.c
parentperl: move CPAN loader wrappers to another namespace (diff)
downloadtgif-edfb7b92a1dbd70858ea5c5356cdb6dc14ec8d3a.tar.xz
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>
Diffstat (limited to 'repository.c')
0 files changed, 0 insertions, 0 deletions