diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-02-14 09:41:32 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-02-14 16:31:57 +0000 |
commit | bc3847b466f9b312d384fe5af2b9d55744db3075 (patch) | |
tree | d54795f7cfe26c75c9a60fd798b5de036df37dac /make_ext.pl | |
parent | 55efcec6eaba5f71068ad86a17184a439d10bad8 (diff) | |
download | perl-bc3847b466f9b312d384fe5af2b9d55744db3075.tar.gz |
In make_ext.pl, on Win32 avoid calling getcwd() twice in quick succession.
Diffstat (limited to 'make_ext.pl')
-rw-r--r-- | make_ext.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/make_ext.pl b/make_ext.pl index 1305e0ee78..b780ec9dab 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -170,9 +170,11 @@ my $perl; my %extra_passthrough; if ($is_Win32) { - (my $here = getcwd()) =~ s{/}{\\}g; + my $build = getcwd(); $perl = $^X; if ($perl =~ m#^\.\.#) { + my $here = $build; + $here =~ s{/}{\\}g; $perl = "$here\\$perl"; } (my $topdir = $perl) =~ s/\\[^\\]+$//; @@ -185,7 +187,6 @@ if ($is_Win32) { system(@args) unless defined $::Cross::platform; } - my $build = getcwd(); print "In $build"; foreach my $dir (@dirs) { chdir($dir) or die "Cannot cd to $dir: $!\n"; |