[Moved to the MakeMaker list, for lack of a better place]

On Thursday, August 29, 2002, at 06:51 AM, Nicholas Clark wrote:
> You'll often see regression tests in the core start like this:
>
> sub BEGIN {
>     if ($ENV{PERL_CORE}){
>       chdir('t') if -d 't';
>       @INC = ('.', '../lib');
>     } else {
>       unshift @INC, 't';
>     }
>
>
> if $ENV{PERL_CORE} is set, then the test knows that it's being 
> run as part
> of a core build, and so it should force @INC to only find uninstalled
> modules in the core tree.

Seems like it would be nicer to set that externally, rather than 
in every test file.  Maybe some code like this could be added to 
blib.pm or something?  Then one could do something like this:

  perl -Mblib=only t/foo.t


> Sorry if I've wasted your time by telling you something you 
> already knew,
> or had inferred from Hugo's reply.

I might have inferred it, but this helped me understand various 
implications, actually.

  -Ken

Reply via email to