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

Re: [MacPerl-Porters] [PATCH cfgperl 6212] MacOS regression suitemods



At 12.47 -0700 2000.06.09, Peter Prymmer wrote:
>> How about something like:
>>
>>     require "paths.pl";
>>
>> where paths.pl contains the offending line?  Something like this really
>> needs to go in, and since we don't have builtin filespec handling routines,
>> we need either to specify special cases or use a module.  Since I don't
>> think using a module is appropriate, I vote for coding special cases.  If
>> people are offended by seeing it there and want it in a separate file that
>> can be loaded in, I am fine with that, too.
>
>How do we get the C<require> to work without checking $^O eq 'MacOS'
>and setting @INC?  Would you like an egg with your chicken or the
>other way 'round?

You put paths.pl in the same directory as the file being called (copy it to
each necessary directory).  Certainly a hack, but for the sake of testing
... not a horrible hack IMO.  As to doing some filespec conversion
natively, heck, we already have some translation of / in paths (%INC and
requires):

   require "Foo/Foo.pm";  # works in MacPerl now

I am personally not much in favor of this, though.  For years I had a main
directory with "/" in the name.  You can change it to "%2F", but now what
about all those routines that recognize each part of a filename as being
only 31 characters long?  What about File::Spec and File::Basename parsing
of these?  It seems like more confusion in some respects in exchange for
less in others.

So anyway, I would like to know what would happen if I wrote this:

  use lib "Bourque:WP/DTP:lib:";

I've since changed the directory name to avoid such conflicts, but for many
years, that's what it was, and I wouldn't be at all surprised if people had
"HD:Programming/Coding:MacPerl:" directories.

-- 
Chris Nandor       |     pudge@pobox.com      |     http://pudge.net/
Andover.Net        | chris.nandor@andover.net | http://slashcode.com/

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-porters-request@macperl.org