Change 28551 by [EMAIL PROTECTED] on 2006/07/12 08:49:17
Upgrade to PathTools 3.19
Affected files ...
... //depot/perl/ext/Cwd/Changes#25 edit
... //depot/perl/lib/Cwd.pm#102 edit
... //depot/perl/lib/File/Spec.pm#52 edit
... //depot/perl/lib/File/Spec/Unix.pm#54 edit
... //depot/perl/lib/File/Spec/t/Spec.t#20 edit
Differences ...
==== //depot/perl/ext/Cwd/Changes#25 (text) ====
Index: perl/ext/Cwd/Changes
--- perl/ext/Cwd/Changes#24~28004~ 2006-04-28 08:35:37.000000000 -0700
+++ perl/ext/Cwd/Changes 2006-07-12 01:49:17.000000000 -0700
@@ -1,5 +1,23 @@
Revision history for Perl distribution PathTools.
+3.19 Tue Jul 11 22:40:26 CDT 2006
+
+ - When abs2rel() is called with two relative paths
+ (e.g. abs2rel('foo/bar/baz', 'foo/bar')) the resolution algorithm
+ needlessly called cwd() (twice!) to turn both arguments into
+ absolute paths. Now it avoids the cwd() calls with a workaround,
+ making a big efficiency win when abs2rel() is called
+ repeatedly. [Brendan O'Dea]
+
+ - Added a build-time dependency on ExtUtils::Install version 1.39
+ when on Windows. This is necessary because version 1.39 knows how
+ to replace an in-use Cwd shared library, but previous versions
+ don't. [Suggested by Adam Kennedy]
+
+ - Fixed File::Spec::Win32->canonpath('foo/../bar'), which was
+ returning \bar, and now properly returns just bar. [Spotted by
+ Heinrich Tegethoff]
+
3.18 Thu Apr 27 22:01:38 CDT 2006
- Fixed some problems on VMS in which a directory called "0" would be
==== //depot/perl/lib/Cwd.pm#102 (text) ====
Index: perl/lib/Cwd.pm
--- perl/lib/Cwd.pm#101~28001~ 2006-04-28 06:34:39.000000000 -0700
+++ perl/lib/Cwd.pm 2006-07-12 01:49:17.000000000 -0700
@@ -171,7 +171,7 @@
use Exporter;
use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
-$VERSION = '3.18';
+$VERSION = '3.19';
@ISA = qw/ Exporter /;
@EXPORT = qw(cwd getcwd fastcwd fastgetcwd);
@@ -370,10 +370,8 @@
# isn't redefined later (20001212 rspier)
*fastgetcwd = \&cwd;
-# By Brandon S. Allbery
-#
-# Usage: $cwd = getcwd();
-
+# A non-XS version of getcwd() - also used to bootstrap the perl build
+# process, when miniperl is running and no XS loading happens.
sub _perl_getcwd
{
abs_path('.');
==== //depot/perl/lib/File/Spec.pm#52 (text) ====
Index: perl/lib/File/Spec.pm
--- perl/lib/File/Spec.pm#51~28001~ 2006-04-28 06:34:39.000000000 -0700
+++ perl/lib/File/Spec.pm 2006-07-12 01:49:17.000000000 -0700
@@ -3,7 +3,7 @@
use strict;
use vars qw(@ISA $VERSION);
-$VERSION = '3.18';
+$VERSION = '3.19';
$VERSION = eval $VERSION;
my %module = (MacOS => 'Mac',
==== //depot/perl/lib/File/Spec/Unix.pm#54 (text) ====
Index: perl/lib/File/Spec/Unix.pm
--- perl/lib/File/Spec/Unix.pm#53~28511~ 2006-07-08 11:00:17.000000000
-0700
+++ perl/lib/File/Spec/Unix.pm 2006-07-12 01:49:17.000000000 -0700
@@ -489,6 +489,7 @@
my($vol, $dirs, $file) = $fs->splitpath($path);
my @dirs = $fs->splitdir($dirs);
+ pop @dirs if @dirs && $dirs[-1] eq '';
my @collapsed;
foreach my $dir (@dirs) {
==== //depot/perl/lib/File/Spec/t/Spec.t#20 (text) ====
Index: perl/lib/File/Spec/t/Spec.t
--- perl/lib/File/Spec/t/Spec.t#19~28001~ 2006-04-28 06:34:39.000000000
-0700
+++ perl/lib/File/Spec/t/Spec.t 2006-07-12 01:49:17.000000000 -0700
@@ -116,6 +116,8 @@
#[ "Unix->abs2rel('../t4','/t1/t2/t3')", '../t4' ],
[ "Unix->abs2rel('/t1/t2/t3', '/')", 't1/t2/t3' ],
[ "Unix->abs2rel('/t1/t2/t3', '/t1')", 't2/t3' ],
+[ "Unix->abs2rel('t1/t2/t3', 't1')", 't2/t3' ],
+[ "Unix->abs2rel('t1/t2/t3', 't4')", '../t1/t2/t3' ],
[ "Unix->rel2abs('t4','/t1/t2/t3')", '/t1/t2/t3/t4' ],
[ "Unix->rel2abs('t4/t5','/t1/t2/t3')", '/t1/t2/t3/t4/t5' ],
@@ -205,6 +207,7 @@
[ "Win32->catdir('A:/')", 'A:\\' ],
[ "Win32->catdir('\\', 'foo')", '\\foo' ],
+
[ "Win32->catfile('a','b','c')", 'a\\b\\c' ],
[ "Win32->catfile('a','b','.\\c')", 'a\\b\\c' ],
[ "Win32->catfile('.\\a','b','c')", 'a\\b\\c' ],
@@ -235,6 +238,8 @@
[ "Win32->canonpath('\\..\\')", '\\' ],
[ "Win32->canonpath('/../')", '\\' ],
[ "Win32->canonpath('/..\\')", '\\' ],
+[ "Win32->canonpath('d1/../foo')", 'foo' ],
+
[ "Win32->can('_cwd')", '/CODE/' ],
# FakeWin32 subclass (see below) just sets CWD to C:\one\two and getdcwd('D')
to D:\alpha\beta
End of Patch.