httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Subject Re: [win32] Makefile.PL fixes
Date Fri, 02 May 2003 06:35:35 GMT
On Fri, 2 May 2003, Stas Bekman wrote:

> Randy Kobes wrote:
> > On Fri, 2 May 2003, Stas Bekman wrote:
> > [ .. ]
> > 
> >>In any case it's probably simpler to:
> >>
> >>if (WIN32 and exists $ENV{APACHE}) {
> >>   $ENV{APACHE} =~ s!\\!/!g;
> >>   push @ARGV, '-httpd', $ENV{APACHE};
> >>}
> >>
> >>somewhere on the top... before Apache::TestMM::filter_args(); is called.
> > 
> > This is much better - thanks! In fact, it's probably better not
> > to (silently) do anything if the user has either set APACHE or
> > used -httpd. The following pushes an appropriate -httpd onto
> > @ARGV if a Win32 user has neither set APACHE nor used -httpd - an
> > advantage of this is that this no longer messes with TEST.PL, as
> > the generated TEST contains the info to the Apache.exe binary.
> 
> but doesn't that contradict your previous patch where you were
> manipulating $ENV{APACHE}?

Yes ... but your comments got me thinking that it might be better
in principle not to do that ... A user may use an incorrect
syntax for the APACHE environment variable (or -httpd, for that
matter), and if Makefile.PL fixes it up silently, it would be
confusing to use the same syntax in another context and find it
fails there. One could check the syntax and print out some
warning message, but with all the possibilities, it's probably
more efficient to do so in Apache-Test, as your next comment
suggests ...

> Also once you finish polish this win32 magic, we want to
> abstract it away so other modules can reuse it. it should be
> called internally by Apache::Test.

Good idea - I'll look at that ...

> probably better to grep /^-httpd$/. it's quite possible that
> some argument will be /my-httpd-2.0/

Good point ...

> > +    for my $drive ('C'..'G') {
> 
> A silly question of the day: can't it be on a diskette? 'A', 'B'? ;)

Another good point - might as well expand that from 'A' .. 'Z' ..

-- 
best regards,
randy


Mime
View raw message