Re: Bug in tests for libwww

Lack Mr G M (gml4410@ggr.co.uk)
Fri, 10 Jul 1998 10:06:55 +0100


Gisle Aas wrote:
> 
> Lack Mr G M <gml4410@ggr.co.uk> writes:
> 
> > t/robot/ua.t & t/local/http.t both use this construct:
> >
> > else {
> >     use Config;
> >     open(DAEMON , "$Config{'perlpath'} robot/ua.t daemon |") or die
> > "Can't exec$
> > }
> >
> >    This only wokrs if the perl you are working with is already
> > installed.
> >.....
> >    Replacing $Config{'perlpath'} with just perl (testing was being done
> > with a PATH set such that perl was a symlink to the new version)
> > allowed
> > all tests to pass.   Why not just use perl?
> 
> Because it want to pick up the right perl.  The perl found in the
> $ENV{PATH} might not be the perl used to build the Makefile.PL.  We
> want to test with the same perl as get the stuff after 'make install'.

   The instruction (which I presume people use) is to run:

 perl Makefile.PL

which is what I do (and did).  It is trivial for me to set the PATH for
my installation process/shell such that 'perl' is what I want.  It is
not trivial for me to ensure that 
$Config{'perlpath'} is what you expect when I am installing a new
version.

   If you really want to ensure you use the same one why not get the
Makefile.PL to save what it was run by to the Makefile and set an
environment variable for 'make test' to use?