Environment variables that CPAN Testers use

BinGOs on 2008-07-28T14:49:10

Maybe not a definitive list, but this is what I have gleamed:

  • AUTOMATED_TESTING - Set by an automated CPAN Tester to indicate, erm, that we are running automated tests.
  • PERL_MM_USE_DEFAULT - Set so that we take the defaults to prompts in Makefile.PL and Build.PL
  • PERL5_CPAN_IS_RUNNING - CPAN.pm appears to set this to process ID of the CPAN process.
  • PERL5_CPANPLUS_IS_RUNNING - CPANPLUS sets this to the process ID of the CPANPLUS process, note also check PERL5_CPAN_IS_RUNNING, as CPAN also sets this variable
  • PERL5_CPANPLUS_IS_VERSION - Set by CPANPLUS to indicate the version that is running
  • PERL5_CPANPLUS_VERBOSE - Set by CPANPLUS to indicate whether it is generating verbose output

Kindly pointed out by Dave Golden:

  • PERL5OPT - used by CPAN::Reporter to load Devel::Autoflush to force output from PL and test files that don't set autoflush themselves. (This has been a headache and is still in active development to find a workable solution.)
  • PERL5LIB - may or may not be set, depending on the test setup
  • PERL_CPAN_REPORTER_DIR - if set, this directory is used in place of the default .cpanreporter directory; this will affect not only the location of the default config.ini, but also the location of the CPAN::Reporter::History database and any other files that live in that directory
  • PERL_CPAN_REPORTER_CONFIG - if set, this file is used in place of the default config.ini file; it may be in any directory, regardless of the choice of configuration directory

Added by Jos Boumans:

  • PERL5_CPANPLUS_IS_EXECUTING -- set by CPANPLUS to the full path of either Build.PL or Makefile.PL while it's executing this file. This helps Module::Install understand that it is running under CPANPLUS and can delegate prereqs up to the parent process

Added by Simon Bertrang:

  • TEST_POD - enables testing of documentation
  • TEST_AUTHOR - in a few cases this enables testing in general
  • PERL_TEST_POD - another name to enable documentation tests
  • PERL_TEST_CRITIC - used to enable critic testing
  • AUTHOR_TESTING - a few authors hide tests with this, mostly documentation tests


More

dagolden on 2008-07-28T15:54:46

PERL5OPT -- used by CPAN::Reporter to load Devel::Autoflush to force output from PL and test files that don't set autoflush themselves. (This has been a headache and is still in active development to find a workable solution.)

PERL5LIB -- may or may not be set, depending on the test setup

PERL_CPAN_REPORTER_DIR -- if set, this directory is used in place of the default .cpanreporter directory; this will affect not only the location of the default config.ini, but also the location of the CPAN::Reporter::History database and any other files that live in that directory

PERL_CPAN_REPORTER_CONFIG -- if set, this file is used in place of the default config.ini file; it may be in any directory, regardless of the choice of configuration directory

-- dagolden

Re:More

kane on 2008-07-28T20:07:51

PERL5_CPANPLUS_IS_EXECUTING -- set by CPANPLUS to the full path of either Build.PL or Makefile.PL while it's executing this file. This helps Module::Install understand that it is running under CPANPLUS and can delegate prereqs up to the parent process

even more

janus on 2008-07-29T06:29:54

TEST_POD - enables testing of documentation

TEST_AUTHOR - in a few cases this enables testing in general

PERL_TEST_POD - another name to enable documentation tests

PERL_TEST_CRITIC - used to enable critic testing

AUTHOR_TESTING - a few authors hide tests with this, mostly documentation tests

Wikified

ChrisDolan on 2008-07-30T02:27:59

I posted these on the Perl5 wiki. Thanks for accumulating this list!