@@ -13,12 +13,11 @@ use ExtUtils::MakeMaker qw($Verbose write_file_via_tmp neatvalue);
13
13
14
14
use ExtUtils::MakeMaker::Config;
15
15
16
-
17
16
# So we don't have to keep calling the methods over and over again,
18
17
# we have these globals to cache the values. Faster and shrtr.
19
- my $Curdir = __PACKAGE__ -> curdir;
20
- my $Rootdir = __PACKAGE__ -> rootdir;
21
- my $Updir = __PACKAGE__ -> updir;
18
+ my $Curdir = File::Spec -> curdir;
19
+ my $Rootdir = File::Spec -> rootdir;
20
+ my $Updir = File::Spec -> updir;
22
21
23
22
my $METASPEC_URL = ' https://metacpan.org/pod/CPAN::Meta::Spec' ;
24
23
my $METASPEC_V = 2;
@@ -207,7 +206,7 @@ Returns true if C<<$self->make>> is the given type; possibilities are:
207
206
208
207
sub is_make_type {
209
208
my ($self , $type ) = @_ ;
210
- (undef , undef , my $make_basename ) = $self -> splitpath($self -> make);
209
+ (undef , undef , my $make_basename ) = File::Spec -> splitpath($self -> make);
211
210
return 1 if $make_basename =~ / \b $type \b /i ; # executable's filename
212
211
return 0 if $make_basename =~ / \b (dmake|nmake)\b /i ; # Never fall through for dmake/nmake
213
212
# now have to run with "-v" and guess
@@ -669,7 +668,7 @@ sub blibdirs_target {
669
668
my ($v , $d , $f ) = File::Spec-> splitpath($ext );
670
669
my @d = File::Spec-> splitdir($d );
671
670
shift @d if $d [0] eq ' lib' ;
672
- push @dirs , $self -> catdir(' $(INST_ARCHLIB)' , ' auto' , @d , $f );
671
+ push @dirs , File::Spec -> catdir(' $(INST_ARCHLIB)' , ' auto' , @d , $f );
673
672
}
674
673
}
675
674
@@ -746,8 +745,8 @@ clean :: clean_subdirs
746
745
$(BASEEXT).exp $(BASEEXT).x
747
746
] );
748
747
749
- push (@files , $self -> catfile(' $(INST_ARCHAUTODIR)' ,' extralibs.all' ));
750
- push (@files , $self -> catfile(' $(INST_ARCHAUTODIR)' ,' extralibs.ld' ));
748
+ push (@files , File::Spec -> catfile(' $(INST_ARCHAUTODIR)' ,' extralibs.all' ));
749
+ push (@files , File::Spec -> catfile(' $(INST_ARCHAUTODIR)' ,' extralibs.ld' ));
751
750
752
751
# core files
753
752
if ($^O eq ' vos' ) {
@@ -1913,8 +1912,8 @@ to XS code. Those are handled in init_xs.
1913
1912
sub init_INST {
1914
1913
my ($self ) = shift ;
1915
1914
1916
- $self -> {INST_ARCHLIB } ||= $self -> catdir($Curdir ," blib" ," arch" );
1917
- $self -> {INST_BIN } ||= $self -> catdir($Curdir ,' blib' ,' bin' );
1915
+ $self -> {INST_ARCHLIB } ||= File::Spec -> catdir($Curdir ," blib" ," arch" );
1916
+ $self -> {INST_BIN } ||= File::Spec -> catdir($Curdir ,' blib' ,' bin' );
1918
1917
1919
1918
# INST_LIB typically pre-set if building an extension after
1920
1919
# perl has been built and installed. Setting INST_LIB allows
@@ -1923,22 +1922,22 @@ sub init_INST {
1923
1922
if ($self -> {PERL_CORE }) {
1924
1923
$self -> {INST_LIB } = $self -> {INST_ARCHLIB } = $self -> {PERL_LIB };
1925
1924
} else {
1926
- $self -> {INST_LIB } = $self -> catdir($Curdir ," blib" ," lib" );
1925
+ $self -> {INST_LIB } = File::Spec -> catdir($Curdir ," blib" ," lib" );
1927
1926
}
1928
1927
}
1929
1928
1930
1929
my @parentdir = split (/ ::/ , $self -> {PARENT_NAME });
1931
- $self -> {INST_LIBDIR } = $self -> catdir(' $(INST_LIB)' , @parentdir );
1932
- $self -> {INST_ARCHLIBDIR } = $self -> catdir(' $(INST_ARCHLIB)' , @parentdir );
1933
- $self -> {INST_AUTODIR } = $self -> catdir(' $(INST_LIB)' , ' auto' ,
1930
+ $self -> {INST_LIBDIR } = File::Spec -> catdir(' $(INST_LIB)' , @parentdir );
1931
+ $self -> {INST_ARCHLIBDIR } = File::Spec -> catdir(' $(INST_ARCHLIB)' , @parentdir );
1932
+ $self -> {INST_AUTODIR } = File::Spec -> catdir(' $(INST_LIB)' , ' auto' ,
1934
1933
' $(FULLEXT)' );
1935
- $self -> {INST_ARCHAUTODIR } = $self -> catdir(' $(INST_ARCHLIB)' , ' auto' ,
1934
+ $self -> {INST_ARCHAUTODIR } = File::Spec -> catdir(' $(INST_ARCHLIB)' , ' auto' ,
1936
1935
' $(FULLEXT)' );
1937
1936
1938
- $self -> {INST_SCRIPT } ||= $self -> catdir($Curdir ,' blib' ,' script' );
1937
+ $self -> {INST_SCRIPT } ||= File::Spec -> catdir($Curdir ,' blib' ,' script' );
1939
1938
1940
- $self -> {INST_MAN1DIR } ||= $self -> catdir($Curdir ,' blib' ,' man1' );
1941
- $self -> {INST_MAN3DIR } ||= $self -> catdir($Curdir ,' blib' ,' man3' );
1939
+ $self -> {INST_MAN1DIR } ||= File::Spec -> catdir($Curdir ,' blib' ,' man1' );
1940
+ $self -> {INST_MAN3DIR } ||= File::Spec -> catdir($Curdir ,' blib' ,' man3' );
1942
1941
1943
1942
return 1;
1944
1943
}
@@ -2148,7 +2147,7 @@ sub init_INSTALL_from_PREFIX {
2148
2147
2149
2148
if ( $var =~ / arch/ ) {
2150
2149
$self -> {$Installvar } ||=
2151
- $self -> catdir($self -> {LIB }, $Config {archname });
2150
+ File::Spec -> catdir($self -> {LIB }, $Config {archname });
2152
2151
}
2153
2152
else {
2154
2153
$self -> {$Installvar } ||= $self -> {LIB };
@@ -2215,7 +2214,7 @@ sub init_INSTALL_from_INSTALL_BASE {
2215
2214
my $key = " INSTALL" .$dir .$uc_thing ;
2216
2215
2217
2216
$install {$key } ||=
2218
- $self -> catdir(' $(INSTALL_BASE)' , @{$map {$thing }});
2217
+ File::Spec -> catdir(' $(INSTALL_BASE)' , @{$map {$thing }});
2219
2218
}
2220
2219
}
2221
2220
@@ -2736,11 +2735,11 @@ sub arch_check {
2736
2735
2737
2736
return 1 if $self -> {PERL_SRC };
2738
2737
2739
- my ($pvol , $pthinks ) = $self -> splitpath($pconfig );
2740
- my ($cvol , $cthinks ) = $self -> splitpath($cconfig );
2738
+ my ($pvol , $pthinks ) = File::Spec -> splitpath($pconfig );
2739
+ my ($cvol , $cthinks ) = File::Spec -> splitpath($cconfig );
2741
2740
2742
- $pthinks = $self -> canonpath($pthinks );
2743
- $cthinks = $self -> canonpath($cthinks );
2741
+ $pthinks = File::Spec -> canonpath($pthinks );
2742
+ $cthinks = File::Spec -> canonpath($cthinks );
2744
2743
2745
2744
my $ret = 1;
2746
2745
if ($pthinks ne $cthinks ) {
@@ -2749,7 +2748,7 @@ sub arch_check {
2749
2748
2750
2749
$ret = 0;
2751
2750
2752
- my $arch = (grep length , $self -> splitdir($pthinks ))[-1];
2751
+ my $arch = (grep length , File::Spec -> splitdir($pthinks ))[-1];
2753
2752
2754
2753
print <<END unless $self -> {UNINSTALLED_PERL };
2755
2754
Your perl and your Config.pm seem to have different ideas about the
@@ -2895,9 +2894,9 @@ installation.
2895
2894
2896
2895
sub libscan {
2897
2896
my ($self ,$path ) = @_ ;
2898
- my ($dirs ,$file ) = ($self -> splitpath($path ))[1,2];
2897
+ my ($dirs ,$file ) = (File::Spec -> splitpath($path ))[1,2];
2899
2898
return ' ' if grep /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/ ,
2900
- $self -> splitdir($dirs ), $file ;
2899
+ File::Spec -> splitdir($dirs ), $file ;
2901
2900
2902
2901
return $path ;
2903
2902
}
@@ -3025,7 +3024,7 @@ Used by perldepend() in MM_Unix and MM_VMS via _perl_header_files_fragment()
3025
3024
sub _perl_header_files {
3026
3025
my $self = shift ;
3027
3026
3028
- my $header_dir = $self -> {PERL_SRC } || $ENV {PERL_SRC } || $self -> catdir($Config {archlibexp }, ' CORE' );
3027
+ my $header_dir = $self -> {PERL_SRC } || $ENV {PERL_SRC } || File::Spec -> catdir($Config {archlibexp }, ' CORE' );
3029
3028
opendir my $dh , $header_dir
3030
3029
or die " Failed to opendir '$header_dir ' to find header files: $! " ;
3031
3030
0 commit comments