Re: Apache::Test question

[prev] [thread] [next] [Date index for 2004/12/19]

From: Stas Bekman
Subject: Re: Apache::Test question
Date: 22:34 on 19 Dec 2004
Torsten Foertsch wrote:
> On Thursday 16 December 2004 17:28, Stas Bekman wrote:
> 
>>grep the source for reconfigure() which I think will enforce the re-cache.
> 
> 
> Sorry, I could not find it. Simply changing refresh to reconfigure yields:

Sorry, I should have said just 'reconfigure', which is not a method. Just 
to spot the code in charge to forcing reconfiguration.

> Can't locate object method "reconfigure" via package "Apache::TestRunPerl" at /home/r2/work/Apache-ModSSL/t/TEST line 31.
> 
> Also grepping the source did not reveal something useful:
> 
> r2@opi:/usr/lib/perl5/vendor_perl/5.8.5/i586-linux-thread-multi/Apache> grep -i reconfigure Test*.pm
> TestConfig.pm:    $self->{clean_level} = shift || 2; #2 == really clean, 1 == reconfigure
> TestConfig.pm:    # we probably could reconfigure on the fly ($self->configure), but
> TestRun.pm:    # reconfigure or not.
> TestRun.pm:    $self->{reconfigure} = $opts{configure} ||
> TestRun.pm:    if ($self->{reconfigure}) {
> TestRun.pm:        delete $self->{reconfigure};
> TestRun.pm:        #if config is cached and MaxClients == 1, must reconfigure
> TestRun.pm:            warning "server is reconfigured for proxy";

right, but the idea was to grep and jump to the code following it, which 
brings us back to refresh().

> While Apache::TestRunPerl::refresh is defined as:
> 
> #if Apache::TestRun refreshes config in the middle of configure
> #we need to re-add modperl configure hooks
> sub refresh {
>     my $self = shift;
>     $self->SUPER::refresh;
>     $self->configure_modperl;
> }
> 
> and Apache::TestRun::refresh as:
> 
> #throw away cached config and start fresh
> sub refresh {
>     my $self = shift;
>     $self->opt_clean(1);
>     $self->{conf_opts}->{save} = delete $self->{conf_opts}->{thaw} || 1;
>     $self->{test_config} = $self->new_test_config()->httpd_config;
>     $self->{test_config}->{server}->{run} = $self;
>     $self->{server} = $self->{test_config}->server;
> }
> 
> At least the comments lead to the idea that refresh() is actually what I want.

right, so see why the cache file is not updated? I think it's because it's 
not saved and you still use the old config object.

Just so that you don't get mislead, Torsten, I'm not trying to figure out 
what the problem is (at least not yet), hoping that you will. Since as far 
as public API goes, everything works and refresh() is not a public API (at 
least not yet). I was just trying to point you to where the solution might be.

        -- 
        __________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

(message missing)

Apache::Test question
Torsten Foertsch 10:31 on 15 Dec 2004

Re: Apache::Test question
Stas Bekman 19:46 on 15 Dec 2004

Re: Apache::Test question
Torsten Foertsch 14:50 on 16 Dec 2004

Re: Apache::Test question
Stas Bekman 16:28 on 16 Dec 2004

Re: Apache::Test question
William McKee 21:19 on 16 Dec 2004

Re: Apache::Test question
Stas Bekman 23:28 on 16 Dec 2004

Re: Apache::Test question
Geoffrey Young 23:39 on 16 Dec 2004

Re: Apache::Test question
Torsten Foertsch 15:32 on 19 Dec 2004

Re: Apache::Test question
Stas Bekman 22:34 on 19 Dec 2004

Re: Apache::Test question
Geoffrey Young 23:36 on 16 Dec 2004

Re: Apache::Test question
Stas Bekman 23:49 on 16 Dec 2004

Re: Apache::Test question
Geoffrey Young 00:29 on 17 Dec 2004

Re: Apache::Test question
Stas Bekman 00:41 on 17 Dec 2004

[PATCH]Re: Apache::Test question
Torsten Foertsch 13:41 on 01 May 2005

Generated at 10:25 on 04 May 2005 by mariachi v0.52