httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Apache::Test: storing the default APXS, APACHE, etc
Date Wed, 30 Jul 2003 08:55:51 GMT
[Splitting into a new thread]

Randy Kobes wrote:
 > On Tue, 29 Jul 2003, Stas Bekman wrote:
 >>Randy Kobes wrote:
 >>>On Tue, 29 Jul 2003, Stas Bekman wrote:
 >>>>In the last few weeks the following two issues were raised:
 >>>>1) store a default location of httpd/apxs in Apache::Test so one should
 >>>>provide it only once.
 >>>>I'm +1 on this feature. Is anybody interested to implement it?
 >>>That sounds like a good idea ... Are you thinking of something
 >>>like of mod_perl 1, or libnet.cfg of libnet -
 >>>a file which gets created the first time the user installs the
 >>>package, and then gets used on subsequent locations, with perhaps
 >>>an initial dialogue asking the user if they want to keep the
 >>>stored settings?
 >>Yes. That's the idea Matt brought up earlier on this list.
 > I'd be interested in taking a look at this ... But just so
 > I understand the intent,
 > - this configuration file would get written at the
 > 'perl Makefile.PL' stage?

Yes, but abstracting it so that it can be invoked later on is a good idea too. 
e.g. we could always store the latest setting.

Also it should be non-fatal, but issue a warning if it can't store things at a 
later time (e.g. the files are owned by root, but the user is trying to 
override them. later we may support local config files, like CPAN/ does)

 > - if the user supplies -httpd and/or -apxs values to
 > 'perl Makefile.PL', or suitable environment variables
 > are set, a dialogue should be invoked, confirming
 > that the user wants to store these values?

I'd like to avoid any prompts if possible. Prompts are evil. I say use the 
value only when it's supplied via the option or env var, but don't prompt. We 
should die giving user a better error message than we do now.

 > - if no such values nor environment variables are supplied,
 > guesses are made, and again the user is asked to confirm?

just store it, no prompts.

 > - upon later uses of Apache::Test, these stored values
 > would be used, unless explicit -httpd or -apxs arguments
 > to t/TEST are given, or the appropriate environment variables
 > are set?


 > - is it only httpd and apxs that get stored, or would it
 > be useful to have others (eg, the Apache user, group, or port)?

There are five things that can be overriden by env vars and many more with 
flags, so say go for the five vars:

One more culprit. The thing should work from Apache::Test standalone build and 
from within mod_perl 2.0 build. So in case of mod_perl 2.0 build, mod_perl 2.0 
will get the values of APXS and others very soon after 'perl Makefile.PL' is 
invoked. I've already provided the code that behaves differently when 
Apache::Test is standalone vs. when it's part of mod_perl 2.0 build, to handle 
correctly the cleanup of Apache/, so it should be easy to re-use it.

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

View raw message