Chris Nandor <pudge@pobox.com> wrote Fri, 9 Jun 2000: > At 10.03 -0700 2000.06.09, Prymmer/Kahn wrote: > >necessitated gzipping and uuencoding. However, owing to the > >rather ugly nature of the changes let me point out in clear text that > >most of the changes are taking the idiom: > > > > BEGIN { unshift @INC, '../lib'; } > > > >to a new one that looks like: > > > > BEGIN { unshift @INC, ($^O eq 'MacOS') ? '::lib:' : '../lib'; } > > > >Most people object to that. I understand why. I am open to suggestions > >regarding another way to handle it that would obviate the need for > >the enclosed patch. > > Well, I can think of other ways, but only using File::Spec. > > use File::Spec::Functions; > BEGIN { unshift @INC, catdir(updir, 'lib') } Bzzt! Can't locate File/Spec/Functions in @INC (@INC contains: : etc.) This was the question/suggestion that Paul Schinder originally asked. BTW I re-wrote autoloader.t to make more extensive use of File::Spec. As I reported it works fine on Unix but it should be tested on NT as well in case there are any lurking File::Spec bugs (UNC paths anyone?). The future mod to filefind.t will also make extensive use of File::Spec. > But we don't want to use external modules for tests. I am not sure I know > why people object to the code you put in? > > 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? > (Oh, and thanks much for all this, Peter!) De nada. Peter Prymmer ==== Want to unsubscribe from this list? ==== Send mail with body "unsubscribe" to macperl-porters-request@macperl.org