develooper Front page | perl.perl5.porters | Postings from May 2004

Re: [perl #29570] perlbug AutoReply: Cwd::realpath doesn't work on files on Windows

Thread Previous
From:
Andrew Pimlott
Date:
May 14, 2004 06:17
Subject:
Re: [perl #29570] perlbug AutoReply: Cwd::realpath doesn't work on files on Windows
Message ID:
20040514124849.GH6821@pimlott.net
Oops--I have Cygwin and ActiveState Perl installed, and used the wrong
perlbug.  On Cygwin, perl 5.8.2 does not have the exact problem I
described, because realpath is aliased to the native (C) abs_path.
However, abs_path (which is supposed to be a synonym for realpath) is
aliased to fast_abs_path, which exhibits the problem.  In 5.8.3,
realpath is also aliased to fast_abs_path on Cygwin, so it should
exhibit the problem (but I haven't tried it).  The "obvious" fix is
instead to use the native abs_path in all cases.

The bug was meant to apply to ActivePerl 5.8.3 build 809.  However, it
appears from a brief test that even win32 has a native abs_path, which
is for some reason not used.  When I eliminated the two aliases from the
'MSWin32' case, it worked fine.

That would still leave some platforms using the sub-optimal
fast_abs_path.

Andrew

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About