On Sat, Feb 17, 2001 at 07:49:37PM +0000, [EMAIL PROTECTED] wrote:
> >A simpler idea would to alter t/TEST so that it runs the tests as
> >"perl -I../lib". This isn't *quite* the same as @INC = '../lib', but
> >it should be close enough.
>
> It isn't. More than once we have things "pass" for _us_ 'cos we have
> perl already and test finds /usr/local/.../Foo.pm but FAIL for users
> who haven't ever had a perl before.
Doh! You're right. I've done that myself.
> >Well, assuming it behaves well under MakeMaker and doesn't have XS and
> >isn't something fancy like the stuff in ext/
> >
> > perl Makefile.PL INST_LIB=/path/to/src/perl/lib
> > make test
> > make install
> > cp test.pl /path/to/src/perl/t/Module/Name.t if -e test.pl
> > cp t/* /path/to/src/perl/t/Module/Name/ if -d t/
>
> It could add the BEGIN { } rather than doing simple 'cp'.
Dangerous. Take Test.pm for instance. It expects certain tests to be
on certain lines because it reads back its own error messages.
Ok, two birds with one stone. Define t/TestSetup.pm as:
chdir 't' if -d 't';
@INC = '../lib';
And then have TEST run all tests with "perl -MTestSetup"!
Now is the time on p5p when we dance.