According to Michael G Schwern: > On Fri, Apr 15, 2005 at 08:31:57PM -0400, Chip Salzenberg wrote: > > There are several methods to determine the current directory. > > Perl 6 is going to have to decide on some sort of standard internal getcwd > technique, $CWD or not.
I don't think Perl 6 "has" to do anything of the kind. It would be a mistake to try. > In the same way that we have open() not fopen, fdopen, freopen... we > can choose the safest and most sensible technique for determining > the cwd and use that. "There's more than one sensible thing. There's more than one safe thing." And there is more than one open. Perl does have fopen/fdopen/freopen, but they're accessed through other techniques besides the name of the operator. For example, Perl spells C<fh = fdopen(5, "r")> as C<open $fh, "<&=5"). The unique technique is there, just pushed out of the operator name and into its parameters. And then there's sysopen(). But open() is beside the point, no matter that it supports my point. :-) As you know, under Unix, there's no such thing as "the current directory" as a string. The only durable current directory is the device and inode of C<stat('.')>. It's not wise to conflate the current directory with a name that at some point in the past could have been used to reach it. > You have to because when a new user asks "how do I get the current > working directory?" [...] Then I answer him with the same patience I answer someone who asks how to get the filename corresponding to an open file descriptor: "There is no portable way. Tell me what you want to do, and maybe I can help you." -- Chip Salzenberg - a.k.a. - <[EMAIL PROTECTED]> Open Source is not an excuse to write fun code then leave the actual work to others.