Skip to content

Commit ad48ea3

Browse files
haargbingos
authored andcommitted
only search for PERL_SRC when PERL_CORE is true or unset
PERL_SRC defines various things about where to build and install modules to. If it was not specified, EUMM would search upward to find the perl source directory. This means that for modules in the perl dist, it was not possible to build them normally without copying the files to a separate directory. Change how PERL_SRC is initialized to avoid doing this search if PERL_CORE is set to a false value. This means setting PERL_CORE to false in your environment will allow building modules normally even if they are in a perl source checkout. If PERL_CORE is not set, still do the search. And if a perl source checkout is found, behave as if PERL_CORE was true.
1 parent d46cc0e commit ad48ea3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ExtUtils/MM_Unix.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,9 +1759,8 @@ sub init_CORE {
17591759

17601760
# Are we building the core?
17611761
$self->{PERL_CORE} = $ENV{PERL_CORE} unless exists $self->{PERL_CORE};
1762-
$self->{PERL_CORE} = 0 unless defined $self->{PERL_CORE};
17631762

1764-
unless ($self->{PERL_SRC}){
1763+
if ((!defined $self->{PERL_CORE} || $self->{PERL_CORE}) && !$self->{PERL_SRC}){
17651764
foreach my $dir_count (1..8) { # 8 is the VMS limit for nesting
17661765
my $dir = $self->catdir(($Updir) x $dir_count);
17671766

@@ -1770,6 +1769,7 @@ sub init_CORE {
17701769
-f $self->catfile($dir,"lib","strict.pm")
17711770
) {
17721771
$self->{PERL_SRC} = $dir ;
1772+
$self->{PERL_CORE} = 1;
17731773
last;
17741774
}
17751775
}

0 commit comments

Comments
 (0)