On Oct 3, 2006, at 10:04 PM, Adam Kennedy wrote:

Christopher H. Laco wrote:
Chris Dolan wrote:
I've seen discussion of the right env var name has been batted around here and on the Module::Build list a couple of times without resolution
or blessing.  So, I hereby propose new .t boilerplate:

  use Test::More;
  if (!$ENV{AUTHOR_TEST} && !$ENV{AUTHOR_TEST_<CPANID>}) {
      plan skip_all => 'Author test';
  }
  plan ...;

Just for the sake of mentioning other things...in terms of this topic,
what is an "author" in AUTHOR_TEST_<CPANID> ?
Is that the original author? The last person who uploaded the dist? A
random author from a group of "core developers"? And how woulod I know
which ones to choose as the person using AUTHOR_TEST_<CPANID>?
Sometimes the author isn't the author, and authors change. Sometimes, a module's "author" varies in the eyes of the public depending on who last
uploaded  the dist.
Personally, I use TEST_PRIVATE instead to avoid any implied ties like that.
But I'm silly like that. :-)

Perhaps, PERL_RELEASE_TESTING or something then...

We've been discussing the name of this envvar for almost a year now, as best I can count. I'm really hoping we can settle on a name very soon. Here are the points I think are important, gleaned from people's recent comments:

* Should have two forms: a general one and a specific one (like AUTHOR_TEST and AUTHOR_TEST_CDOLAN)
 * Should start with PERL_
 * Should contain TEST or TESTING
 * Should not be too long, so it doesn't need to wrap in code
 * Should clearly indicate that the test is not for end users
 * Should indicate that it is valuable for any contributing developers
   (i.e. I don't like PRIVATE -- too forbidding)

So, I revise my proposal to:
  PERL_DEV_TEST
and
  PERL_DEV_TEST_<ID>

where <ID> is any string likely not to collide with other developers or projects. It would be used like this in a .t file:

  use strict;
  use Test::More;
  if (!$ENV{PERL_DEV_TEST} && !$ENV{PERL_DEV_TEST_PERLCRITIC}) {
      plan skip_all => 'Developer test';
  }
  plan ...

Is that good enough?

Chris

--
Chris Dolan, Software Developer, Clotho Advanced Media Inc.
608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703
vCard: http://www.chrisdolan.net/ChrisDolan.vcf

Clotho Advanced Media, Inc. - Creators of MediaLandscape Software (http://www.media-landscape.com/) and partners in the revolutionary Croquet project (http://www.opencroquet.org/)


Reply via email to