perl: move the perl/Git/FromCPAN tree to perl/FromCPAN

Move the CPAN modules that have lived under perl/Git/FromCPAN since my 20d2a30f8f ("Makefile: replace perl/Makefile.PL with simple make rules", 2017-12-10) to perl/FromCPAN. A subsequent change will teach the Makefile to only install these copies of CPAN modules if a flag that distro packagers would like to set isn't set. Due to how the wildcard globbing is being done it's much easier to accomplish that if they're moved to their own directory. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Mar 3, 2018 at 15:38 UTC 382029fc003d400147339573ab5448a88c336f55
5 files changed +5 -3
Makefile
+3
@@ -2300,9 +2300,12 @@ po/build/locale/%/LC_MESSAGES/git.mo: po/%.po
2300
2301 LIB_PERL := $(wildcard perl/Git.pm perl/Git/*.pm perl/Git/*/*.pm perl/Git/*/*/*.pm)
2302 LIB_PERL_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_PERL))
2303 +LIB_CPAN := $(wildcard perl/FromCPAN/*.pm perl/FromCPAN/*/*.pm)
2304 +LIB_CPAN_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_CPAN))
2305
2306 ifndef NO_PERL
2307 all:: $(LIB_PERL_GEN)
2308 +all:: $(LIB_CPAN_GEN)
2309 endif
2310
2311 perl/build/lib/%.pm: perl/%.pm
perl/FromCPAN/.gitattributes renamed
perl/FromCPAN/Error.pm renamed
perl/FromCPAN/Mail/Address.pm renamed
perl/Git/LoadCPAN.pm
+2 -3
@@ -16,8 +16,7 @@ source.
16 Therefore the L<Git::LoadCPAN> namespace shipped with Git contains
17 wrapper modules like C<Git::LoadCPAN::Module::Name> that will first
18 attempt to load C<Module::Name> from the OS, and if that doesn't work
19 -will fall back on C<Git::FromCPAN::Module::Name> shipped with Git
20 -itself.
19 +will fall back on C<FromCPAN::Module::Name> shipped with Git itself.
20
21 Usually distributors will not ship with Git's Git::FromCPAN tree at
22 all, preferring to use their own packaging of CPAN modules instead.
@@ -52,7 +51,7 @@ sub import {
51 my $Git_LoadCPAN_pm_root = File::Basename::dirname($Git_LoadCPAN_pm_path) || die "BUG: Can't figure out lib/Git dirname from '$Git_LoadCPAN_pm_path'!";
52
53 require File::Spec;
55 - my $Git_pm_FromCPAN_root = File::Spec->catdir($Git_LoadCPAN_pm_root, 'FromCPAN');
54 + my $Git_pm_FromCPAN_root = File::Spec->catdir($Git_LoadCPAN_pm_root, '..', 'FromCPAN');
55 die "BUG: '$Git_pm_FromCPAN_root' should be a directory!" unless -d $Git_pm_FromCPAN_root;
56
57 local @INC = ($Git_pm_FromCPAN_root, @INC);