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