@@ -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;
@@ -212,7 +211,7 @@ sub _clear_maketype_cache { %maketype2true = () }
212
211
sub is_make_type {
213
212
my ($self , $type ) = @_ ;
214
213
return $maketype2true {$type } if defined $maketype2true {$type };
215
- (undef , undef , my $make_basename ) = $self -> splitpath($self -> make);
214
+ (undef , undef , my $make_basename ) = File::Spec -> splitpath($self -> make);
216
215
return $maketype2true {$type } = 1
217
216
if $make_basename =~ / \b $type \b /i ; # executable's filename
218
217
return $maketype2true {$type } = 0
@@ -678,7 +677,7 @@ sub blibdirs_target {
678
677
my ($v , $d , $f ) = File::Spec-> splitpath($ext );
679
678
my @d = File::Spec-> splitdir($d );
680
679
shift @d if $d [0] eq ' lib' ;
681
- push @dirs , $self -> catdir(' $(INST_ARCHLIB)' , ' auto' , @d , $f );
680
+ push @dirs , File::Spec -> catdir(' $(INST_ARCHLIB)' , ' auto' , @d , $f );
682
681
}
683
682
}
684
683
@@ -755,8 +754,8 @@ clean :: clean_subdirs
755
754
$(BASEEXT).exp $(BASEEXT).x
756
755
] );
757
756
758
- push (@files , $self -> catfile(' $(INST_ARCHAUTODIR)' ,' extralibs.all' ));
759
- push (@files , $self -> catfile(' $(INST_ARCHAUTODIR)' ,' extralibs.ld' ));
757
+ push (@files , File::Spec -> catfile(' $(INST_ARCHAUTODIR)' ,' extralibs.all' ));
758
+ push (@files , File::Spec -> catfile(' $(INST_ARCHAUTODIR)' ,' extralibs.ld' ));
760
759
761
760
# core files
762
761
if ($^O eq ' vos' ) {
@@ -1922,8 +1921,8 @@ to XS code. Those are handled in init_xs.
1922
1921
sub init_INST {
1923
1922
my ($self ) = shift ;
1924
1923
1925
- $self -> {INST_ARCHLIB } ||= $self -> catdir($Curdir ," blib" ," arch" );
1926
- $self -> {INST_BIN } ||= $self -> catdir($Curdir ,' blib' ,' bin' );
1924
+ $self -> {INST_ARCHLIB } ||= File::Spec -> catdir($Curdir ," blib" ," arch" );
1925
+ $self -> {INST_BIN } ||= File::Spec -> catdir($Curdir ,' blib' ,' bin' );
1927
1926
1928
1927
# INST_LIB typically pre-set if building an extension after
1929
1928
# perl has been built and installed. Setting INST_LIB allows
@@ -1932,22 +1931,22 @@ sub init_INST {
1932
1931
if ($self -> {PERL_CORE }) {
1933
1932
$self -> {INST_LIB } = $self -> {INST_ARCHLIB } = $self -> {PERL_LIB };
1934
1933
} else {
1935
- $self -> {INST_LIB } = $self -> catdir($Curdir ," blib" ," lib" );
1934
+ $self -> {INST_LIB } = File::Spec -> catdir($Curdir ," blib" ," lib" );
1936
1935
}
1937
1936
}
1938
1937
1939
1938
my @parentdir = split (/ ::/ , $self -> {PARENT_NAME });
1940
- $self -> {INST_LIBDIR } = $self -> catdir(' $(INST_LIB)' , @parentdir );
1941
- $self -> {INST_ARCHLIBDIR } = $self -> catdir(' $(INST_ARCHLIB)' , @parentdir );
1942
- $self -> {INST_AUTODIR } = $self -> catdir(' $(INST_LIB)' , ' auto' ,
1939
+ $self -> {INST_LIBDIR } = File::Spec -> catdir(' $(INST_LIB)' , @parentdir );
1940
+ $self -> {INST_ARCHLIBDIR } = File::Spec -> catdir(' $(INST_ARCHLIB)' , @parentdir );
1941
+ $self -> {INST_AUTODIR } = File::Spec -> catdir(' $(INST_LIB)' , ' auto' ,
1943
1942
' $(FULLEXT)' );
1944
- $self -> {INST_ARCHAUTODIR } = $self -> catdir(' $(INST_ARCHLIB)' , ' auto' ,
1943
+ $self -> {INST_ARCHAUTODIR } = File::Spec -> catdir(' $(INST_ARCHLIB)' , ' auto' ,
1945
1944
' $(FULLEXT)' );
1946
1945
1947
- $self -> {INST_SCRIPT } ||= $self -> catdir($Curdir ,' blib' ,' script' );
1946
+ $self -> {INST_SCRIPT } ||= File::Spec -> catdir($Curdir ,' blib' ,' script' );
1948
1947
1949
- $self -> {INST_MAN1DIR } ||= $self -> catdir($Curdir ,' blib' ,' man1' );
1950
- $self -> {INST_MAN3DIR } ||= $self -> catdir($Curdir ,' blib' ,' man3' );
1948
+ $self -> {INST_MAN1DIR } ||= File::Spec -> catdir($Curdir ,' blib' ,' man1' );
1949
+ $self -> {INST_MAN3DIR } ||= File::Spec -> catdir($Curdir ,' blib' ,' man3' );
1951
1950
1952
1951
return 1;
1953
1952
}
@@ -2157,7 +2156,7 @@ sub init_INSTALL_from_PREFIX {
2157
2156
2158
2157
if ( $var =~ / arch/ ) {
2159
2158
$self -> {$Installvar } ||=
2160
- $self -> catdir($self -> {LIB }, $Config {archname });
2159
+ File::Spec -> catdir($self -> {LIB }, $Config {archname });
2161
2160
}
2162
2161
else {
2163
2162
$self -> {$Installvar } ||= $self -> {LIB };
@@ -2224,7 +2223,7 @@ sub init_INSTALL_from_INSTALL_BASE {
2224
2223
my $key = " INSTALL" .$dir .$uc_thing ;
2225
2224
2226
2225
$install {$key } ||=
2227
- $self -> catdir(' $(INSTALL_BASE)' , @{$map {$thing }});
2226
+ File::Spec -> catdir(' $(INSTALL_BASE)' , @{$map {$thing }});
2228
2227
}
2229
2228
}
2230
2229
@@ -2745,11 +2744,11 @@ sub arch_check {
2745
2744
2746
2745
return 1 if $self -> {PERL_SRC };
2747
2746
2748
- my ($pvol , $pthinks ) = $self -> splitpath($pconfig );
2749
- my ($cvol , $cthinks ) = $self -> splitpath($cconfig );
2747
+ my ($pvol , $pthinks ) = File::Spec -> splitpath($pconfig );
2748
+ my ($cvol , $cthinks ) = File::Spec -> splitpath($cconfig );
2750
2749
2751
- $pthinks = $self -> canonpath($pthinks );
2752
- $cthinks = $self -> canonpath($cthinks );
2750
+ $pthinks = File::Spec -> canonpath($pthinks );
2751
+ $cthinks = File::Spec -> canonpath($cthinks );
2753
2752
2754
2753
my $ret = 1;
2755
2754
if ($pthinks ne $cthinks ) {
@@ -2758,7 +2757,7 @@ sub arch_check {
2758
2757
2759
2758
$ret = 0;
2760
2759
2761
- my $arch = (grep length , $self -> splitdir($pthinks ))[-1];
2760
+ my $arch = (grep length , File::Spec -> splitdir($pthinks ))[-1];
2762
2761
2763
2762
print <<END unless $self -> {UNINSTALLED_PERL };
2764
2763
Your perl and your Config.pm seem to have different ideas about the
@@ -2904,9 +2903,9 @@ installation.
2904
2903
2905
2904
sub libscan {
2906
2905
my ($self ,$path ) = @_ ;
2907
- my ($dirs ,$file ) = ($self -> splitpath($path ))[1,2];
2906
+ my ($dirs ,$file ) = (File::Spec -> splitpath($path ))[1,2];
2908
2907
return ' ' if grep /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/ ,
2909
- $self -> splitdir($dirs ), $file ;
2908
+ File::Spec -> splitdir($dirs ), $file ;
2910
2909
2911
2910
return $path ;
2912
2911
}
@@ -3034,7 +3033,7 @@ Used by perldepend() in MM_Unix and MM_VMS via _perl_header_files_fragment()
3034
3033
sub _perl_header_files {
3035
3034
my $self = shift ;
3036
3035
3037
- my $header_dir = $self -> {PERL_SRC } || $ENV {PERL_SRC } || $self -> catdir($Config {archlibexp }, ' CORE' );
3036
+ my $header_dir = $self -> {PERL_SRC } || $ENV {PERL_SRC } || File::Spec -> catdir($Config {archlibexp }, ' CORE' );
3038
3037
opendir my $dh , $header_dir
3039
3038
or die " Failed to opendir '$header_dir ' to find header files: $! " ;
3040
3039
0 commit comments