You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Geoffrey Young <ge...@modperlcookbook.org> on 2004/05/21 21:04:21 UTC

Win32 pathnames (was Re: [RELEASE CANDIDATE] mod_perl-1.99_14 RC1)

>>I asked Ken Williams about this, and he replied:
>>
>>[...]
>>File::Spec is supposed to only deal with file
>>specifications.  In general it shouldn't ever touch the
>>filesystem itself.  So canonpath()  shouldn't ask the OS to
>>translate a path to long form - that's the job of something
>>else, essentially a layer on top of File::Spec or something.
>>
>>A similar issue has been well hashed-out on Unix: should
>>canonpath()  turn "foo/../bar" into just "bar".  It's been
>>ruled that it should *not*, because if 'foo' is a symbolic
>>link then "foo/../bar" may refer to a different place than
>>"bar" does.
>>
> 
> Cwd::realpath() does that sort of thing, so perhaps it is that which 
> needs patching to sort out Win32 short/long names then?

possibly.

randy suggested asking p5p, which might be a good thing to do.  I understand
the position on File::Spec, and I guess that sounds right.  but if there is
no module currently available that will strip out all the platform dependent
goo (symlinks, parent directories, short filenames) so that two paths that
end up at the same file can be compared for equality then I guess it's time
for one.

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org