directories of interest, a multiplicity alternative to CWD

2009-08-19 Thread Darren Duncan
All this discussion about file paths, particularly about current working directory, has inspired me to raise another idea for how this could be done, which may be a little more abstract or different than you're used to, but may also be an elegant solution. My proposal draws inspiration from a

Re: directories of interest, a multiplicity alternative to CWD

2009-08-19 Thread Richard Hainsworth
I think this is a much more flexible system than those suggested so far. It seems to me that this approach - lets the OS and the implementation deal with pathways that are valid (taking into account locale and OS constraints). - defines only that part of the location/directory tree/file system

Re: directories of interest, a multiplicity alternative to CWD

2009-08-19 Thread Timothy S. Nelson
On Wed, 19 Aug 2009, Darren Duncan wrote: My proposal is to have all filesystem paths as seen within Perl being relative paths, and that there are multiple filesystem roots which can be referred to by name and each relative path is explicitly relative to a named root; each of these named

Re: directories of interest, a multiplicity alternative to CWD

2009-08-19 Thread Darren Duncan
Timothy, thanks for your feedback. My proposal was never about the syntax, which I stated at the end, but rather my syntax was just illustrative. I actually meant for p{} or whatever syntax to be used, but I didn't recall those details and was keeping it simple. And the use of a %DOI hash

Re: directories of interest, a multiplicity alternative to CWD

2009-08-19 Thread Darren Duncan
Richard Hainsworth wrote: I think this is a much more flexible system than those suggested so far. It seems to me that this approach - lets the OS and the implementation deal with pathways that are valid (taking into account locale and OS constraints). - defines only that part of the

Re: directories of interest, a multiplicity alternative to CWD

2009-08-19 Thread Darren Duncan
Darren Duncan wrote: The named filesystem roots can be defined or altered at runtime by Perl code, and each one is defined within the context of another. I should clarify my intention here, which is that each DOI is mapped behind the scenes by Perl to a standalone absolute filesystem url, and

Re: directories of interest, a multiplicity alternative to CWD

2009-08-19 Thread Jon Lang
'home' should be spelled '~'. -- Jonathan Dataweaver Lang

Re: directories of interest, a multiplicity alternative to CWD

2009-08-19 Thread Darren Duncan
Jon Lang wrote: 'home' should be spelled '~'. Yes, of course. And conceptually a DOI can be any string at all. Logically we'd probably have non-alpha names for many of the common/standard ones. -- Darren Duncan

Re: directories of interest, a multiplicity alternative to CWD

2009-08-19 Thread David Green
On 2009-Aug-19, at 2:08 am, Darren Duncan wrote: %DOI{'mycwd'} = %DOI{'fscwd'}; %DOI{'mycwd'} ~= 'subdir'; # later my $fh = IO.open( 'mycwd/myfile.txt' ); For ease of use, we can still have vars like $*CWD, which might be an alias for a doi with a specific name. I've been thinking of

Re: directories of interest, a multiplicity alternative to CWD

2009-08-19 Thread Darren Duncan
Good comments, David. David Green wrote: snip So the set of default standard dirs would just be a hash of IO objects: $IO::DOI{home}, $IO::DOI{docs}, etc. Actually, different OS's would provide different sets of standard named dirs, and you should be able to import them: # Assume I'm