httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [win32] Makefile.PL fixes
Date Fri, 02 May 2003 07:00:31 GMT
Randy Kobes wrote:
> 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 ...

That makes sense.

But why do you still need to do unix-ify the path?

+  $apache = Win32::GetShortPathName($apache);
+  $apache =~ s!\\!/!g;

Repeating my previous questions:

   why won't \\ work? Does it work if you do:
   perl Makefile.PL -httpd C:\\path\\to\\apache

>>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 ...

My guinea pig is Apache::Peek I have already written a set of useful functions 
for a consistent API between user environment and developers. See 
Apache-Peek-0.01/Makefile.PL. I'm planning to move them all to a separate 
package, bundle with both mod_perls and have it separately on CPAN.

__________________________________________________________________
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