stas        2004/08/06 14:43:23

  Modified:    perl-framework/Apache-Test/lib/Apache Test.pm TestConfig.pm
                        TestRun.pm
  Log:
  better split of the Apache::TestConfig->new in two parts
  
  Revision  Changes    Path
  1.92      +1 -1      httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm
  
  Index: Test.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -u -r1.91 -r1.92
  --- Test.pm   6 Aug 2004 19:31:21 -0000       1.91
  +++ Test.pm   6 Aug 2004 21:43:22 -0000       1.92
  @@ -54,7 +54,7 @@
   my $Config;
   
   sub config {
  -    $Config ||= Apache::TestConfig->thaw->complete_config;
  +    $Config ||= Apache::TestConfig->thaw;
   }
   
   sub vars {
  
  
  
  1.233     +15 -1     
httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm
  
  Index: TestConfig.pm
  ===================================================================
  RCS file: 
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
  retrieving revision 1.232
  retrieving revision 1.233
  diff -u -u -r1.232 -r1.233
  --- TestConfig.pm     6 Aug 2004 19:31:21 -0000       1.232
  +++ TestConfig.pm     6 Aug 2004 21:43:22 -0000       1.233
  @@ -189,6 +189,20 @@
   
   sub new {
       my $class = shift;
  +
  +    # httpd-independent components
  +    my $self = $class->new_common(@_);
  +
  +    # components requiring httpd knowledge
  +    $self->httpd_config;
  +
  +    $self;
  +}
  +
  +# setup httpd-independent components
  +sub new_common {
  +    my $class = shift;
  +
       my $args;
   
       $args = shift if $_[0] and ref $_[0];
  @@ -326,7 +340,7 @@
   
   # figure out where httpd is and run extra config hooks which require
   # knowledge of where httpd is
  -sub complete_config {
  +sub httpd_config {
       my $self = shift;
   
       my $vars = $self->{vars};
  
  
  
  1.175     +5 -3      
httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm
  
  Index: TestRun.pm
  ===================================================================
  RCS file: 
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
  retrieving revision 1.174
  retrieving revision 1.175
  diff -u -u -r1.174 -r1.175
  --- TestRun.pm        6 Aug 2004 18:20:42 -0000       1.174
  +++ TestRun.pm        6 Aug 2004 21:43:22 -0000       1.175
  @@ -395,7 +395,7 @@
       my $self = shift;
       $self->opt_clean(1);
       $self->{conf_opts}->{save} = delete $self->{conf_opts}->{thaw} || 1;
  -    $self->{test_config} = $self->new_test_config()->complete_config;
  +    $self->{test_config} = $self->new_test_config();
       $self->{server} = $self->{test_config}->server;
   }
   
  @@ -683,7 +683,9 @@
   
       $self->pre_configure();
   
  -    $self->{test_config} = $self->new_test_config();
  +    # can't setup the httpd-specific parts of the config object yet
  +    $self->{test_config} =
  +        Apache::TestConfig->new_common($self->{conf_opts});
   
       $self->warn_core();
   
  @@ -695,7 +697,7 @@
       $self->try_exit_opts;
   
       # httpd is found here (unless it was already configured before)
  -    $self->{test_config}->complete_config;
  +    $self->{test_config}->httpd_config;
   
       if ($self->{opts}->{configure}) {
           warning "cleaning out current configuration";
  
  
  

Reply via email to