Skip to content

Commit

Permalink
perl: move the perl/Git/FromCPAN tree to perl/FromCPAN
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
avar authored and gitster committed Mar 5, 2018
1 parent edfb7b9 commit 382029f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2300,9 +2300,12 @@ po/build/locale/%/LC_MESSAGES/git.mo: po/%.po

LIB_PERL := $(wildcard perl/Git.pm perl/Git/*.pm perl/Git/*/*.pm perl/Git/*/*/*.pm)
LIB_PERL_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_PERL))
LIB_CPAN := $(wildcard perl/FromCPAN/*.pm perl/FromCPAN/*/*.pm)
LIB_CPAN_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_CPAN))

ifndef NO_PERL
all:: $(LIB_PERL_GEN)
all:: $(LIB_CPAN_GEN)
endif

perl/build/lib/%.pm: perl/%.pm
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions perl/Git/LoadCPAN.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ source.
Therefore the L<Git::LoadCPAN> namespace shipped with Git contains
wrapper modules like C<Git::LoadCPAN::Module::Name> that will first
attempt to load C<Module::Name> from the OS, and if that doesn't work
will fall back on C<Git::FromCPAN::Module::Name> shipped with Git
itself.
will fall back on C<FromCPAN::Module::Name> shipped with Git itself.
Usually distributors will not ship with Git's Git::FromCPAN tree at
all, preferring to use their own packaging of CPAN modules instead.
Expand Down Expand Up @@ -52,7 +51,7 @@ sub import {
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'!";

require File::Spec;
my $Git_pm_FromCPAN_root = File::Spec->catdir($Git_LoadCPAN_pm_root, 'FromCPAN');
my $Git_pm_FromCPAN_root = File::Spec->catdir($Git_LoadCPAN_pm_root, '..', 'FromCPAN');
die "BUG: '$Git_pm_FromCPAN_root' should be a directory!" unless -d $Git_pm_FromCPAN_root;

local @INC = ($Git_pm_FromCPAN_root, @INC);
Expand Down

0 comments on commit 382029f

Please sign in to comment.