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:

[EMAIL 
PROTECTED]:/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:[EMAIL PROTECTED] 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



Reply via email to