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

[MacPerl] Path-separator (was: Newlines)



At 03:26 +0200 13-10-97, Richard Rathe wrote:
>Another example is the directory delimiter. What harm would be done
>if MacPerl automatically changed '/' to ':' and back again when it
>works on directories and files?

Actually, that's a more interesting question then EOL. :-)

What if Perl core syntax sez that all functions that take a path as a
parameter, expects the path to be in the traditional UNIX style. You could
then determine the "native" path separator at build time ("sh Configure"
time, for all you UNIX weenies ;D). This should be mostly painless, but
might be a slight compile-time performance hit because you have to put a
wrapper around all the path functions before they are passed on to the
system call.

Another option is to make paths be URLs, possibly of the "file:" scheme,
which allows great flexibility for the peculiarities of various platforms.
That way you could even use the "afp:" scheme if Matthias were to implement
SubWoofer support. :-)

Abstract the path in Perl syntax completely away from paths in the
platform-native syntax. Never again worry about this weirdness.


- Terje



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