httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: need help to add per-user config to Apache::Test
Date Wed, 03 Sep 2003 17:52:01 GMT
Randy Kobes wrote:
> On Tue, 2 Sep 2003, Stas Bekman wrote:
> 
> 
>>Randy Kobes wrote:
> 
> [ .. ]
> 
>>Very good, a few more comments following
>>
>>
>>>===========================================================
>>>Index: TestRun.pm
>>
>>[...]
>> > +    $self->write_config() if
>>
>>probably better to do that right after $self->configure is
>>completed, as the very last thing in:
>>Apache::TestRun::configure
> 
> 
> OK - this is done in the diff at the end. For this, to
> override a setting within Apache::TestConfigData from some
> external package, one has to do
>    t/TEST -config -save -httpd /usr/local/httpd/bin/httpd

It should work during 'make test' as well, since it already runs t/TEST 
-config. And also whenever you provide any options to t/TEST it reconfigures, 
so I believe the normal run will do the same:

  t/TEST -save -httpd /usr/local/httpd/bin/httpd

I haven't tested that though.

>>>+    my $file = catfile($dir, 'TestConfigData.pm');
>>>+    unless (open($fh, ">$file")) {
>>>+        warn "Cannot open $file: $!";
>>>+        return;
>>>+    }
> 
> [ .. ]
> 
>>Ahm, so you write that file twice if inside the
>>Apache-Test build dir because Makefile.PL has been run
>>long time ago. We will have problems with MakeMaker
>>picking this file for 'make install', so we must provide a
>>placeholder for that file. I suppose
>>Apache/TestConfigData.pm always needs to be in the
>>distribution but include an empty:
>>
>>   $Apache::TestConfigData = {};
>>
>>So now instead of trying to eval {} for the module in @_
>>we can simply require it, and then test whether
>>%$Apache::TestConfigData has something in it?
> 
> 
> Good idea - that's much simpler. The following assumes
> that an empty Apache/TestConfigData.pm is present, and
> then, as you say, 'make install' will pick up any changes
> that have been made to it.

If I remember correctly 'make install' will complain about the mismatch in 
sizes since 'make' has already put the files into blib? Did it work for you 
just fine? Purhaps we do need to update the two.

Otherwise looks good ;)

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


Mime
View raw message