FAQ

On 7/8/05, Michael G Schwern wrote:
On Fri, Jul 08, 2005 at 11:07:22PM +0200, demerphq wrote:
should be testing here, but i beleive the problem you are thinking of
is due to symlinks to a directory? If so then the win32 equivelent
would be a junction I think and in that case yes, foo\..\bar == bar.
I have the creeping feeling that there's an argument to be made here, but
I never fully understood the symlinks vs .. cannonpath argument so I'll
hope someone else jumps in and makes it.
Me too. Not being all that familiar with *nix file systems I made my
best stab at an answer as it seems to pertain to Win32. I think John
Peacock also said something to this effect.
To be honest i would really like to see the expected behaviour of
canonpath when called on a relative path explicitly defined. IMO
canonpath should act more like rel2abs, insofar as it should support
an optional $base argument to use instead of CWD when trying to clean up a relative path. canonpath() should never be inserting the CWD when cleaning up. "./bar" is the same as "bar" but "$CWD/bar" is not! Its important that cannonical
relative paths remain relative.
Sorry, i guess I didnt express myself properly. You cant clean up a
relative path properly without knowing where it is relative to.
Consider the following path:

..\..\foo

If we are in \bar then ..\..\foo is the same as ..\foo and \foo but
if we are in \bar\baz\bat then its not the same as either as it maps
to \bar\foo.

yves

--
perl -Mre=debug -e "/just|another|perl|hacker/"

## Related Discussions

 view thread | post posts ‹ prev | 9 of 19 | next ›
Discussion Overview
 group perl5-porters categories perl posted Jul 6, '05 at 9:00p active Jul 12, '05 at 1:15a posts 19 users 5 website perl.org

### 5 users in discussion

Content

People

Support

Translate

site design / logo © 2022 Grokbase