Joe Orton wrote:
On Tue, Aug 10, 2004 at 09:56:12AM -0700, Stas Bekman wrote:

Aha! Excellent, Geoff! Does it solve the problem by moving those default_module calls after getting httpd config?


Moving the calls one line further on fixed it for me. OK to check in? (BTW your patch had whitespace issues and only applied with patch -l)

Index: Apache-Test/lib/Apache/TestConfig.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
retrieving revision 1.235
diff -u -r1.235 TestConfig.pm
--- Apache-Test/lib/Apache/TestConfig.pm 9 Aug 2004 06:19:15 -0000 1.235
+++ Apache-Test/lib/Apache/TestConfig.pm 10 Aug 2004 21:12:59 -0000
@@ -313,13 +313,6 @@
$vars->{proxyssl_url} ||= '';
$vars->{defines} ||= '';
- $self->default_module(cgi => [qw(mod_cgi mod_cgid)]);
- $self->default_module(thread => [qw(worker threaded)]);
- $self->default_module(ssl => [qw(mod_ssl)]);
- $self->default_module(access => [qw(mod_access mod_authz_host)]);
- $self->default_module(auth => [qw(mod_auth mod_auth_basic)]);
- $self->default_module(php => [qw(mod_php4 mod_php5)]);
-
$self->{hostport} = $self->hostport;
$self->{server} = $self->new_test_server;
@@ -359,6 +352,14 @@
}
$self->inherit_config; #see TestConfigParse.pm
+
+ $self->default_module(cgi => [qw(mod_cgi mod_cgid)]);
+ $self->default_module(thread => [qw(worker threaded)]);
+ $self->default_module(ssl => [qw(mod_ssl)]);
+ $self->default_module(access => [qw(mod_access mod_authz_host)]);
+ $self->default_module(auth => [qw(mod_auth mod_auth_basic)]);
+ $self->default_module(php => [qw(mod_php4 mod_php5)]);
+
$self->configure_httpd_eapi; #must come after inherit_config
$self->{server}->post_config;

I'd rather see it moved two statements (it still works, doesn't it?) so the eapi comes right after inherit_config. Otherwise, yes, please commit it.


so are we all clean now? Any other problems?

As a result of my changes, now the API has two wrappers Apache::Test::config (full config as before), and Apache::Test::basic_config, which is the same sans httpd information. For example to autogenerate t/TEST and other files you don't need to know anything about httpd, and therefore you shouldn't require users to supply that info before it's really needed. Until now things were silently failing (to find httpd stuff), making it really hard to trace some problems. Now things fail when something goes wrong, so this separation was important.

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to