Skip to content

Commit 382029f

Browse files
avargitster
authored andcommitted
perl: move the perl/Git/FromCPAN tree to perl/FromCPAN
Move the CPAN modules that have lived under perl/Git/FromCPAN since my 20d2a30 ("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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent edfb7b9 commit 382029f

File tree

5 files changed

+5
-3
lines changed

5 files changed

+5
-3
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2300,9 +2300,12 @@ po/build/locale/%/LC_MESSAGES/git.mo: po/%.po
23002300

23012301
LIB_PERL := $(wildcard perl/Git.pm perl/Git/*.pm perl/Git/*/*.pm perl/Git/*/*/*.pm)
23022302
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))
23032305

23042306
ifndef NO_PERL
23052307
all:: $(LIB_PERL_GEN)
2308+
all:: $(LIB_CPAN_GEN)
23062309
endif
23072310

23082311
perl/build/lib/%.pm: perl/%.pm
File renamed without changes.
File renamed without changes.
File renamed without changes.

perl/Git/LoadCPAN.pm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ source.
1616
Therefore the L<Git::LoadCPAN> namespace shipped with Git contains
1717
wrapper modules like C<Git::LoadCPAN::Module::Name> that will first
1818
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.
2120
2221
Usually distributors will not ship with Git's Git::FromCPAN tree at
2322
all, preferring to use their own packaging of CPAN modules instead.
@@ -52,7 +51,7 @@ sub import {
5251
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'!";
5352

5453
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');
5655
die "BUG: '$Git_pm_FromCPAN_root' should be a directory!" unless -d $Git_pm_FromCPAN_root;
5756

5857
local @INC = ($Git_pm_FromCPAN_root, @INC);

0 commit comments

Comments
 (0)