[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Porting File::PathConvert



Thanks, you're clearing up a lot of details for me.

Chris Nandor wrote:
> No.  You'd have to have a root directory to do that.  There is nothing
> "before" volume1: to go back to.

Thanks! Are there any screwy paths for filenames that have special
meanings, like 'NUL' or some such?

> Note that the -e test is only performed if there is no : in the name.  
...snip...
> The best thing to remember is
> that volume names and folder names SHOULD always be trailed by a :.  If you
> do that, you're safe.

Ah, that makes sense, now, thanks! The same policy is true of URLs,
using a '/' to indicate directories, but for different reasons.

> 
> >Also, which volume and folder are checked for -e ":file"?
> 
> The current directory.

Sorry, I should rephrase: is there only one current directory, like in
most common OSs, or can there be one per volume along with a current
volume as in DOS/Win32 drive letters? Not that it's actually important,
I think you got me straghtened out above.

> >What is the exact meaning of the file spec "file"?
> 
> I don't follow.

I don't lead :-). Actually, you answered it above: it depends on
what files are in the current directory and on volume names. Does
MacOS gives preference to files in cwd over volume names like
MacPerl does (I ask out of curiosity, only)?

> No.  name: could be a symbolic link (alias).  To use your example above, I
> have this file spec:
> 
>     Bird:MacPerl:site_perl:::java:
> 
> If you simplified it by hand, it would be:
> 
>     Bird:java:
> 
> But it actually resolves to:
> 
>     Bird:src:Pudge:pudgeprogs:java:
> 
> Because site_perl is an alias to:
> 
>     Bird:src:Pudge:pudgeprogs:perl:site_specific:
> 
But, given:

     Bird:MacPerl:site_perl::Pod

You might want:

     Bird:MacPerl:Pod

It all depends on whether you want the symlinks to be transparent
(what you see is what you get), or you want the resolving behavior
you demonstrate. Thanks for pointing it out, though. 

My use for this module (so far) has been in making absolute links
in to relative ones in HTML documentation, both perl's PODs (for the
sake of a test bed), and in HTML generated from other sources. In
which case I want WYSIWYG, or 'logical' paths as opposed to
'physical' paths.

I hadn't even thought about the symbolic links issue in this context.

Thanks,

Barrie

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch