On Wed, 30 Jul 2003 05:50, Struan Donald wrote:
>
> In cases where you require some information to perform a test (say a
> database name, or login information) is there an accepted way of doing
> it? More specifically is there some way I can ask for the information
> and if I don't get a response in x seconds assume either defaults or
> SKIP the test?

If it's general test configuration, it should happen at Makefile.PL
time.  The only modules which should be interactive at test time are
modules that provide interactive behaviour, eg Term::ReadLine::Perl.

If <STDIN> returns undef, then its a pretty safe bet that there's
no-one there, otherwise they're at least trying to script it.  That
is, make this work:

   perl Makefile.PL < /dev/null

The Makefile.PL then writes out configuration to somewhere (eg, in
t/config.pl) which the tests can `require', and skip tests if the
configuration is missing.
-- 
Sam Vilain, [EMAIL PROTECTED]

The sage does not distinguish between himself and the world;
The needs of other people are as his own.
 - Tao Te Ching chapter 49


Reply via email to