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

Re: [MacPerl-Porters] [PATCH: 5.6.0]regression test patches for:t:comp: folder




On Sun, 14 May 2000, Paul Schinder wrote:

> At 5:57 PM -0700 5/14/00, Prymmer/Kahn wrote:

> >diff -ru :comp.orig:colon.t :comp:colon.t
> >--- :comp.orig:colon.t	Tue Jul 20 17:18:11 1999
> >+++ :comp:colon.t	Sun May 14 10:39:12 2000
> >@@ -9,7 +9,12 @@
> >
> >  BEGIN {
> >      chdir 't' if -d 't';
> >-    unshift @INC, '../lib';
> >+	if ($^O eq 'MacOS') {
> >+        unshift @INC, '::lib:';
> >+	}
> >+	else {
> >+        unshift @INC, '../lib';
> >+	}
> >  }
> 
> This, and the others like it, seem to be candidates for File::Spec. 
> The tests are run by perl rather than miniperl, right?  So we should 
> at this point have access to File::Spec, or are we caught by a 
> chicken/egg problem?
> 
> use File::Spec::Functions;
> 
> unshift @INC, catfile(updir(),"lib");

This is a good question, because that is certainly the most
popular type of change that I've found necessary.  I think that 
the test suite is typically run before the `make install` 
(or `dmake -n install` && capture output && press Enter) step is
carried out so that a C<use File::Spec::Functions;> statement would 
not work until ::lib: was stuffed into @INC - which must happen in
a BEGIN {} block to be effective.  So yes this is a File::Spec
type of problem but the fact that tests are run against a build
directory tree rather than an installed tree makes a huge difference.
(In other words we need the egg before we can hatch a chicken).

I don't think that perl vs miniperl has any relevance yet since
I have yet to run a test against something that C<uses> a static
or XS module (hence Dynaloader).  At any rate I was running all tests
thus far with miniperl and it handled C<use Config;> and 
C<use strict;> statements just fine, provided that I put ::lib: 
into @INC.  Has anyone besides Matthias been able to build perl yet? 
If you have then please try this:

   Directory :t:
   {mini}perl -e 'print(join("\n",@INC,""))'

is it not the case that the paths are missing :MacPerl:lib: where by
:MacPerl: I mean the perl source folder?  (By the way, with my miniperl
that print out of @INC only returns the one element ":").

One other thing to consider is that on many (mostly POSIXish) platforms
one can try to run:

   make minitest

in an effort to obtain diagnostic output from a partially built
perl or miniperl binary.  It might be that loading all of
File::Spec::Functions, particularly for an os that has not yet 
had a File::Spec::$Osname.pm written might prove difficult for 
such porting efforts.

Peter Prymmer



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