diff options
author | kmx <kmx@volny.cz> | 2010-10-03 17:03:46 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-10-03 17:03:46 -0700 |
commit | 8440aeb01ed67fa3ebf280e54f071a6248a52f98 (patch) | |
tree | 48202565c530b4724bb941ee8add7c190cb6896b /dist | |
parent | 810f3b7cb37729a7fdd266bf11c5856dfceb4332 (diff) | |
download | perl-8440aeb01ed67fa3ebf280e54f071a6248a52f98.tar.gz |
[perl #51562] Problem & "solution" for building 5.10.0 w/win32+mingw+dmake
Run `cd`, rather than `cmd /c cd`, in miniperl on Windows.
Diffstat (limited to 'dist')
-rw-r--r-- | dist/Cwd/Cwd.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/dist/Cwd/Cwd.pm b/dist/Cwd/Cwd.pm index 50b6c4fad8..4889bbf330 100644 --- a/dist/Cwd/Cwd.pm +++ b/dist/Cwd/Cwd.pm @@ -747,6 +747,13 @@ sub _os2_cwd { return $ENV{'PWD'}; } +sub _win32_cwd_simple { + $ENV{'PWD'} = `cd`; + chomp $ENV{'PWD'}; + $ENV{'PWD'} =~ s:\\:/:g ; + return $ENV{'PWD'}; +} + sub _win32_cwd { if (eval 'defined &DynaLoader::boot_DynaLoader') { $ENV{'PWD'} = Win32::GetCwd(); @@ -758,7 +765,7 @@ sub _win32_cwd { return $ENV{'PWD'}; } -*_NT_cwd = defined &Win32::GetCwd ? \&_win32_cwd : \&_os2_cwd; +*_NT_cwd = defined &Win32::GetCwd ? \&_win32_cwd : \&_win32_cwd_simple; sub _dos_cwd { if (!defined &Dos::GetCwd) { |