perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@ectoplasm.org>
Subject Re: svn commit: r109383 - /perl/modperl/trunk/Changes /perl/modperl/trunk/Makefile.PL
Date Thu, 02 Dec 2004 00:14:35 GMT
Stas Bekman wrote:
> Philippe M. Chiasson wrote:
> 
>>stas@apache.org wrote:
> 
>>>     else {
>>>+        unless ($build->{MP_USE_STATIC}) {
>>
>>
>>This one check has been standardized as $build->should_build_apache();
> 
> Right, but since:
> 
> sub should_build_apache {
>      my ($self) = @_;
>      return $self->{MP_USE_STATIC} ? 1 : 0;
> }
> 
> if you look at the loop:
> 
>      if ($build->{MP_APXS}) {
>          ...
>      }
>      elsif ($build->{MP_AP_PREFIX}) {
>          ...
>      }
>      else {
>          unless ($build->{MP_USE_STATIC}) {
>              ...
>          }
>      }
> 
> it's easier to parse, than:
> 
>      if ($build->{MP_APXS}) {
>          ...
>      }
>      elsif ($build->{MP_AP_PREFIX}) {
>          ...
>      }
>      else {
>          unless ($build->should_build_apache) {
>              ...
>          }
>      }
> 
> no?

Yes, I just looked at the patch and didn't quite see the whole context
of the code. I guess it makes sense the way it is.

> Remind me please why did we add this wrapper? I think it used to be 
> something more complex but now it's really just $self->{MP_USE_STATIC} ? 1 
> : 0;

Yup, I think the main reason was just for clarity, nothing more.

-- 
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Mime
View raw message