summaryrefslogtreecommitdiff
path: root/make_ext.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-04-27 13:05:26 +0200
committerNicholas Clark <nick@ccl4.org>2012-06-05 20:59:36 +0200
commit14636674d1354874af66d4ede62b8e5fe6bb836b (patch)
treeb56f89ff582f37086d3d6afb36a0be1081c072ca /make_ext.pl
parenta0a3f71856bf44d3386282fd8254477a750d1006 (diff)
downloadperl-14636674d1354874af66d4ede62b8e5fe6bb836b.tar.gz
In make_ext.pl, move loading FindExt and Cwd into the Win32-only code.
As Cwd is now required instead of used and hence doesn't export, qualify the calls to getcwd() with the package name.
Diffstat (limited to 'make_ext.pl')
-rw-r--r--make_ext.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/make_ext.pl b/make_ext.pl
index d6561b12e5..f678cd6c30 100644
--- a/make_ext.pl
+++ b/make_ext.pl
@@ -5,12 +5,10 @@ use Config;
BEGIN {
if ($^O eq 'MSWin32') {
unshift @INC, '../dist/Cwd';
- require FindExt;
} else {
unshift @INC, 'dist/Cwd';
}
}
-use Cwd;
my $is_Win32 = $^O eq 'MSWin32';
my $is_VMS = $^O eq 'VMS';
@@ -147,7 +145,9 @@ my $perl;
my %extra_passthrough;
if ($is_Win32) {
- my $build = getcwd();
+ require Cwd;
+ require FindExt;
+ my $build = Cwd::getcwd();
$perl = $^X;
if ($perl =~ m#^\.\.#) {
my $here = $build;
@@ -167,7 +167,7 @@ if ($is_Win32) {
print "In $build";
foreach my $dir (@dirs) {
chdir($dir) or die "Cannot cd to $dir: $!\n";
- (my $ext = getcwd()) =~ s{/}{\\}g;
+ (my $ext = Cwd::getcwd()) =~ s{/}{\\}g;
FindExt::scan_ext($ext);
FindExt::set_static_extensions(split ' ', $Config{static_ext});
chdir $build