On Sat, Jul 09, 2005 at 10:17:09AM -0500, Ken Williams wrote:
> Personally I think we should recommend (as it does now in the 
> canonpath() docs) that the user use Cwd::realpath() when they want to 
> collapse foo/.. in paths.

realpath() returns an absolute path.  collapse() leaves relative paths
relative and absolute paths absolute.  They do different things.


>  If we provide a logical-only collapse() 
> method, we know it's buggy (in the sense that it sometimes will point 
> the user to a different file) before we even release it.

Its not buggy, its just another transform you can perform on a path.  
collapse() does not guarantee that the result will point to the same file
any more than catdir() does.  It would only be buggy if we automatically did 
it as part of canonpath().  

collapse() is a tool.  Let the user use it as they see fit and shoot off
as many toes as they want.

What would be worse is if they tried to hand code something like this and
got it wrong, as illustrated in Win32->canonpath().


-- 
Michael G Schwern     [EMAIL PROTECTED]     http://www.pobox.com/~schwern
You are wicked and wrong to have broken inside and peeked at the
implementation and then relied upon it.
        -- tchrist in <[EMAIL PROTECTED]>

Reply via email to