summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/lib/blib.pm
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2008-09-29 17:35:51 +0000
committermillert <millert@openbsd.org>2008-09-29 17:35:51 +0000
commit7bfa9f444b545f1bc96a4b2919ed2583bf07c7ea (patch)
treea27ed65c25e4fb26d9bca8126dbdf2b189894d6a /gnu/usr.bin/perl/lib/blib.pm
parentimport perl 5.10.0 from CPAN (diff)
downloadwireguard-openbsd-7bfa9f444b545f1bc96a4b2919ed2583bf07c7ea.tar.xz
wireguard-openbsd-7bfa9f444b545f1bc96a4b2919ed2583bf07c7ea.zip
fix conflicts and merge in local changes to perl 5.10.0
Diffstat (limited to 'gnu/usr.bin/perl/lib/blib.pm')
-rw-r--r--gnu/usr.bin/perl/lib/blib.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/usr.bin/perl/lib/blib.pm b/gnu/usr.bin/perl/lib/blib.pm
index 45ccd9b5184..98f1612da51 100644
--- a/gnu/usr.bin/perl/lib/blib.pm
+++ b/gnu/usr.bin/perl/lib/blib.pm
@@ -46,7 +46,18 @@ $Verbose = 0;
sub import
{
my $package = shift;
- my $dir = getcwd;
+ my $dir;
+ if ($^O eq "MSWin32" && -f "Win32.xs") {
+ # We don't use getcwd() on Windows because it will internally
+ # call Win32::GetCwd(), which will get the Win32 module loaded.
+ # That means that it would not be possible to run `make test`
+ # for the Win32 module because blib.pm would always load the
+ # installed version before @INC gets updated with the blib path.
+ chomp($dir = `cd`);
+ }
+ else {
+ $dir = getcwd;
+ }
if ($^O eq 'VMS') { ($dir = VMS::Filespec::unixify($dir)) =~ s-/\z--; }
if (@_)
{