Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use catfile() or Unix path semantics where appropriate.

  • Loading branch information...
commit 99fcec3c645f94cb5c68aeff1c15854b385adae8 1 parent 269ea7e
@craigberry craigberry authored committed
View
5 ChangeLog
@@ -18,6 +18,11 @@
Improved repository links and added GitHub issue tracking link to
the distribution metadata.
+ Switched from File::Spec's catdir to catfile for path names, to
+ fix failures on VMS. Also now use Unix path semantics where
+ they're not required to be platform-specific. Thanks to Craig A.
+ Berry for the patch (RT #105511).
+
2015-02-23 David E. Wheeler <david@justatheory.org>
* Release 3.30
No changes since 3.29_6.
View
9 t/search10.t
@@ -33,10 +33,7 @@ print "# CWD: $cwd\n";
sub source_path {
my $file = shift;
if ($ENV{PERL_CORE}) {
- require File::Spec;
- my $updir = File::Spec->updir;
- my $dir = File::Spec->catdir($updir, 'lib', 'Pod', 'Simple', 't');
- return File::Spec->catdir ($dir, $file);
+ return "../lib/Pod/Simple/t/$file";
} else {
return $file;
}
@@ -69,10 +66,10 @@ print $p;
my $ascii_order;
if( -e ($ascii_order = source_path('ascii_order.pl'))) {
#
-} elsif(-e ($ascii_order = File::Spec->catdir($cwd, 't', 'ascii_order.pl'))) {
+} elsif(-e ($ascii_order = File::Spec->catfile($cwd, 't', 'ascii_order.pl'))) {
#
} else {
- print STDERR __FILE__, ": ", __LINE__, ": ascii_order='$ascii_order'; curdir=", $cwd, "; ", File::Spec->catdir($cwd, 't', 'ascii_order.pl'), "\n";
+ print STDERR __FILE__, ": ", __LINE__, ": ascii_order='$ascii_order'; curdir=", $cwd, "; ", File::Spec->catfile($cwd, 't', 'ascii_order.pl'), "\n";
die "Can't find ascii_order.pl";
}
View
7 t/search12.t
@@ -26,10 +26,7 @@ print "# CWD: $cwd\n";
sub source_path {
my $file = shift;
if ($ENV{PERL_CORE}) {
- require File::Spec;
- my $updir = File::Spec->updir;
- my $dir = File::Spec->catdir($updir, 'lib', 'Pod', 'Simple', 't');
- return File::Spec->catdir ($dir, $file);
+ return "../lib/Pod/Simple/t/$file";
} else {
return $file;
}
@@ -62,7 +59,7 @@ print $p;
my $ascii_order;
if( -e ($ascii_order = source_path('ascii_order.pl'))) {
#
-} elsif(-e ($ascii_order = File::Spec->catdir($cwd, 't', 'ascii_order.pl'))) {
+} elsif(-e ($ascii_order = File::Spec->catfile($cwd, 't', 'ascii_order.pl'))) {
#
} else {
die "Can't find ascii_order.pl";
View
6 t/search20.t
@@ -31,9 +31,7 @@ print "# CWD: $cwd\n";
sub source_path {
my $file = shift;
if ($ENV{PERL_CORE}) {
- my $updir = File::Spec->updir;
- my $dir = File::Spec->catdir($updir, 'lib', 'Pod', 'Simple', 't');
- return File::Spec->catdir ($dir, $file);
+ return "../lib/Pod/Simple/t/$file";
} else {
return $file;
}
@@ -70,7 +68,7 @@ print $p;
my $ascii_order;
if( -e ($ascii_order = source_path('ascii_order.pl'))) {
#
-} elsif(-e ($ascii_order = File::Spec->catdir($cwd, 't', 'ascii_order.pl'))) {
+} elsif(-e ($ascii_order = File::Spec->catfile($cwd, 't', 'ascii_order.pl'))) {
#
} else {
die "Can't find ascii_order.pl";
View
6 t/search22.t
@@ -27,9 +27,7 @@ print "# CWD: $cwd\n";
sub source_path {
my $file = shift;
if ($ENV{PERL_CORE}) {
- my $updir = File::Spec->updir;
- my $dir = File::Spec->catdir($updir, 'lib', 'Pod', 'Simple', 't');
- return File::Spec->catdir ($dir, $file);
+ return "../lib/Pod/Simple/t/$file";
} else {
return $file;
}
@@ -71,7 +69,7 @@ print $p;
my $ascii_order;
if( -e ($ascii_order = source_path('ascii_order.pl'))) {
#
-} elsif(-e ($ascii_order = File::Spec->catdir($cwd, 't', 'ascii_order.pl'))) {
+} elsif(-e ($ascii_order = File::Spec->catfile($cwd, 't', 'ascii_order.pl'))) {
#
} else {
die "Can't find ascii_order.pl";
View
6 t/search26.t
@@ -33,9 +33,7 @@ print "# CWD: $cwd\n";
sub source_path {
my $file = shift;
if ($ENV{PERL_CORE}) {
- my $updir = File::Spec->updir;
- my $dir = File::Spec->catdir($updir, 'lib', 'Pod', 'Simple', 't');
- return File::Spec->catdir ($dir, $file);
+ return "../lib/Pod/Simple/t/$file";
} else {
return $file;
}
@@ -81,7 +79,7 @@ print $p;
my $ascii_order;
if( -e ($ascii_order = source_path('ascii_order.pl'))) {
#
-} elsif(-e ($ascii_order = File::Spec->catdir($cwd, 't', 'ascii_order.pl'))) {
+} elsif(-e ($ascii_order = File::Spec->catfile($cwd, 't', 'ascii_order.pl'))) {
#
} else {
die "Can't find ascii_order.pl";
View
6 t/search28.t
@@ -27,9 +27,7 @@ print "# CWD: $cwd\n";
sub source_path {
my $file = shift;
if ($ENV{PERL_CORE}) {
- my $updir = File::Spec->updir;
- my $dir = File::Spec->catdir($updir, 'lib', 'Pod', 'Simple', 't');
- return File::Spec->catdir ($dir, $file);
+ return "../lib/Pod/Simple/t/$file";
} else {
return $file;
}
@@ -75,7 +73,7 @@ print $p;
my $ascii_order;
if( -e ($ascii_order = source_path('ascii_order.pl'))) {
#
-} elsif(-e ($ascii_order = File::Spec->catdir($cwd, 't', 'ascii_order.pl'))) {
+} elsif(-e ($ascii_order = File::Spec->catfile($cwd, 't', 'ascii_order.pl'))) {
#
} else {
die "Can't find ascii_order.pl";
Please sign in to comment.
Something went wrong with that request. Please try again.