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
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);
# 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('.');
#[ "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' ],
[ "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' ],
[ "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