On Wed, Aug 28, 2002 at 12:44:52PM +0100, [EMAIL PROTECTED] wrote:
> Ken Williams <[EMAIL PROTECTED]> wrote:
> :What is PERL_CORE?
>
> An environment variable we set when building the perl core. It is
> often used by modules that live dual lives to detect the context
> in which they are being built.
And also for regression tests, to detect the context in which they are
being run. 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.
Otherwise the test script is being run by a user installing from CPAN, so it
needs to find normal modules in the installed location, so it doesn't mess
with @INC
The perl test harness sets $ENV{PERL_CORE}
Sorry if I've wasted your time by telling you something you already knew,
or had inferred from Hugo's reply.
Nicholas Clark
--
Even better than the real thing: http://nms-cgi.sourceforge.net/