develooper Front page | perl.perl5.porters | Postings from November 2003

Re: [PATCH 5.8.2 @21574] make tests relocatable

Thread Previous | Thread Next
From:
Alan Burlison
Date:
November 13, 2003 15:19
Subject:
Re: [PATCH 5.8.2 @21574] make tests relocatable
Message ID:
3FB41140.4070508@sun.com
Ilya Zakharevich wrote:

> Setting PERL5LIB is not enough.  One needs to *remove* the rest from
> @INC to be sure what libraries are tested.

True, as you might end up picking up some old stuff that was lying around 
otherwise.  Gah.

>>The problem with the existing "BEGIN { ... }" junk 
>>is that it BREAKS any attempt to use PERL5LIB  as it forcibly overwrites 
>>@INC
> 
> Not any more (in most scripts, my automated edit [intentionally] did
> not cover some other syntaxes used to modify @INC).

It would be nice to make this 100% consistent, and even better to say that 
'all tests runs need to -MTestInit on the command-line'.  That way if you 
needed to do anything special you only have to modify TestInit.pm rather 
than every individual test script.

> As you see, I disagree.  IMO, this BEGIN block plays in an important
> role in *simplifying* debugging.  As far as the boilerplate uses 4 or
> 5 "components" (such as the above @INC line), and the purpose of these
> components are explained in t/README, I see no problem.

As I said, I think factoring it out would be even better.

-- 
Alan Burlison
--


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About