httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: apxs on Win32
Date Wed, 30 Jul 2003 22:27:17 GMT
Randy Kobes wrote:
> On Wed, 30 Jul 2003, Stas Bekman wrote:
>>+1 on the patch
>>Randy, whatever you think is the best for win32, please go
>>ahead with it.  Untill we get someone else on win32 involved,
>>you are pretty much free to decide how to handle things and
>>what's the best for the user, as long as the changes don't
>>break the code on other platforms. It's really hard to judge
>>what's good or less good without seeing the problem. Perhaps
>>somebody else can do that. I remember Philippe was trying to
>>set win32 env, but he is now in transition from one continent
>>to another...
>>On the other hand, I really dislike the fact that the code gets
>>too many conditionals, making it much harder to comprehend. We
>>should consider to use subclasses for win32 (or any other
>>platform that requires too many special cases). What do you
>>think? There is no hurry for now, but we should keep it at the
>>backs of our heads (unless of course you think it's a cool idea
>>and want to go with it right now ;). The good thing is once
>>subclassed, there is very little danger that the code on other
>>platforms will go broken.
> You're right that there's getting to be too many conditionals
> in places, and subclassing would be a better way to go ...
> I'll take a look at that, but I'm going on a bit of a break
> in a couple of days - what about for now, doing something like
> ModPerl::Build does: have, for some sub
> sub whatever {
>   my $self = shift;
>   my $what = \&{"whatever_$^O"};
>   $what = \&whatever_default unless defined &$what;
>   $what->($self);
> }
> sub whatever_default {
>   ....
> }
> and then, to add something special for MSWin32, simply define a
> sub whatever_MSWin32 {
>   ...
> }
> which gets used in place of the default. I could redo that
> patch in this form easily, if that would be better for now.

It's up to you, Randy. Using the above technique will make it easier to make a 
real subclass later on. If you don't have time, commit the patch as is and fix 
that later.

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

View raw message