summaryrefslogtreecommitdiff
path: root/t/old-base.t
diff options
context:
space:
mode:
authorGisle Aas <gisle@aas.no>2003-01-02 05:21:31 +0000
committerGisle Aas <gisle@aas.no>2003-01-02 05:21:31 +0000
commitedffad30e560b8d301433dcb6cea4aaaf85333f5 (patch)
tree33843b03dec9c5c22152a95640a4de8a8447da12 /t/old-base.t
parent2b64b9f7dcd3045fe7ce5cab1c66e3ffb7c0f199 (diff)
downloaduri-edffad30e560b8d301433dcb6cea4aaaf85333f5.tar.gz
From: Warren Jones <wjones@fluke.com>
Subject: Fix for URI.pm (recogizing UNC paths) To: libwww@perl.org Date: Thu, 8 Aug 2002 12:11:12 -0700 Organization: Fluke Corporation Hello, I just built URI.pm version 1.21 under Windows NT with Perl 5.8.0, and found that it failed tests 2 and 4 in old-base.t. URI.pm is OK, the bug is in the test script. I've installed Perl on a network drive using UNC paths (starting with \\). Some code in old-base.t tries to make sure that all paths in @INC are absolute, but it doesn't recognize UNC paths, so it tries to prepend $pwd. I'm including a patch. For a more general solution you might consider using File::Spec->file_name_is_absolute() and/or File::Spec->rel2abs(). (But I found those methods think that "\foo" is absolute, which doesn't seem quite right without a drive letter.)
Diffstat (limited to 't/old-base.t')
-rw-r--r--t/old-base.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/old-base.t b/t/old-base.t
index aa31c78..840d22e 100644
--- a/t/old-base.t
+++ b/t/old-base.t
@@ -34,7 +34,8 @@ if ($^O eq 'VMS') {
for (@INC) {
my $x = $_;
$x = VMS::Filespec::unixpath($x) if $^O eq 'VMS';
- next if $x =~ m|^/| or $^O =~ /os2|mswin32/i and $x =~ m|^\w:[\\/]|;
+ next if $x =~ m|^/| or $^O =~ /os2|mswin32/i
+ and $x =~ m#^(\w:[\\/]|[\\/]{2})#;
print "Turn lib path $x into $pwd/$x\n";
$_ = "$pwd/$x";