Re: Unify cwd() [was: Re: $*CWD instead of chdir() and cwd()]

2005-04-21 Thread Larry Wall
On Thu, Apr 21, 2005 at 08:22:29AM +0200, Johan Vromans wrote: : >From the perspective of 'current directory' there should also be a : simple and elegant way that will do in most cases. Advanced tricks can : be made possible using separate modules and such. Yes, easy things should be easy, and har

Re: Unify cwd() [was: Re: $*CWD instead of chdir() and cwd()]

2005-04-21 Thread Juerd
Johan Vromans skribis 2005-04-21 8:22 (+0200): > This is exactly the point (I think) Schwern is trying to make. There > is 'open', that will do most of the time. If a novice user asks how to > open a file, you can say "Well, just 'open $fh, $file'". If you want > more than vanilla file access, th

Re: Unify cwd() [was: Re: $*CWD instead of chdir() and cwd()]

2005-04-21 Thread Johan Vromans
Chip Salzenberg <[EMAIL PROTECTED]> writes: > According to Michael G Schwern: >> 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. > > And there is more than one open. Perl does have f

Re: Unify cwd() [was: Re: $*CWD instead of chdir() and cwd()]

2005-04-16 Thread Dave Whipp
Chip Salzenberg wrote: 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. 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 i

Re: Unify cwd() [was: Re: $*CWD instead of chdir() and cwd()]

2005-04-16 Thread Chip Salzenberg
According to Michael G Schwern: > Yes, there are lots of ways to check the cwd each filling in one edge > case or another. However I'd like to believe its possible to come up with > one simple, safe cwd() that works for 99.9% of the cases and call that cwd(). Well, it's certainly possible ... and

Re: Unify cwd() [was: Re: $*CWD instead of chdir() and cwd()]

2005-04-16 Thread John Macdonald
On Saturday 16 April 2005 01:53, Michael G Schwern wrote: > How cwd() is implemented is not so important as what happens when it hits > an edge case. So maybe we can try to come up with a best fit cwd(). I'd > start by listing out the edge cases and what the possible behaviors are. > Maybe we

Re: Unify cwd() [was: Re: $*CWD instead of chdir() and cwd()]

2005-04-16 Thread Michael G Schwern
On Fri, Apr 15, 2005 at 09:32:23PM -0400, Chip Salzenberg wrote: > > 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. Sorry, I had assumed that having

Re: Unify cwd() [was: Re: $*CWD instead of chdir() and cwd()]

2005-04-16 Thread Chip Salzenberg
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"