At 13:46 +0200 2002.05.31, Thomas Wegner wrote:
>Just one thing: Most of the tests, including the ExtUtils:: tests,
>still assume to be in the perl/t/ directory, at least that's what
>it looks like. This makes fixing @INC issues a real pain in the
>rear (ahem...), to be honest. And some tests just don't run,
>because they are deeper in the directory tree as expected, i.e.
>@INC  = '../lib'; doesn't work. So why have these test been
>moved into lib/? Or did I miss something?

I am running the tests from perl/t/.  My current test script sent
separately in off-list mail.  Every uncommented test is working (or is
mostly working, or is noted in the comments at the end to fail).  I think I
have only 8 tests failing that are uncommented, and 5 of those are expected
to.

Essentially, the tests run as:

        :perl -I::lib ::lib:ExtUtils:...

so we stay in the same place.


>>Maybe I will get to the ExtUtils tests tomorrow.  It's kinda ugly in there,
>
>Yep, more than ugly. 00setup_dummy.t drives me crazy :-).

I got that one taken care of, yeah, it was hairy.  Patch will be on
perl5-changes-mac this morning.



>Correct me if I'm wrong: According to lib.pm's pod, paths are added (not
>replaced) to the front of @INC. Thus, tests 2 & 3 expect @INC to be
>
>     ('stuff/moo/MacPPC', 'stuff/moo', '../lib') ,
>
>if we were on Unix, right?

Aha, I think you're onto it.  This is what sleep deprivation does to me.  :)


>If you agree, and Jarkko agrees, I suggest that lib.pm no longer uses Unix
>paths only (if possible).  Although MacPerl tolerates Unix paths to some
>degree, we cannot translate Mac OS native paths to Unix paths in all cases
>(and e.g. a -d 'stuff/moo/MacPPC', which is done internally, will always
>fail).

Note recent patch to perl.c does this:

        :perl -I'../lib' -le 'print "@INC"'
        ::lib:MacPPC: ::lib:

However, that only works for stuff in @INC already, or added to @INC via
-I.  We could fix lib.pm to do this, as you did, but my question is:

"Should we preserve the Unix style of the @INC element?"

That is, should the above output be as it is, or should it be
"../lib/MacPPC ../lib" ?  I am unsure.  I think this is reasonable, and if
so, then we should do the same thing in lib.pm.  We just need to run
Mac::FileSpec::Unixish::nativize.

        my $Mac_FS;
        if ($^O eq 'MacOS') {
                $Mac_FS = eval { require Mac::FileSpec::Unixish };
        }

#...

        if ($Mac_FS) {
                $_ = Mac::FileSpec::Unixish::nativize($_);
        }

>From then on, treat it as a Mac path.

Jarkko, do you think this is reasonable, not just for 5.8.0 (the catdir
stuff could all be put in if ($^O eq 'MacOS') for now), but in general?
That it is reasonable to fudge values in @INC to be Mac-style if Unix-style
are passed?

-- 
Chris Nandor                      [EMAIL PROTECTED]    http://pudge.net/
Open Source Development Network    [EMAIL PROTECTED]     http://osdn.com/

Reply via email to