You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2004/05/07 03:58:19 UTC
Re: cvs commit: modperl-2.0/t/response/TestAPI module.pm
stas@apache.org wrote:
> stas 2004/05/06 18:47:13
>
> Modified: t/response/TestAPI module.pm
> Log:
> USE_(STATIC|DSO) can be both set at the same time, try MODPERL_LIB_SHARED
>
> Revision Changes Path
> 1.11 +5 -4 modperl-2.0/t/response/TestAPI/module.pm
>
> Index: module.pm
> ===================================================================
> RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/module.pm,v
> retrieving revision 1.10
> retrieving revision 1.11
> diff -u -u -r1.10 -r1.11
> --- module.pm 6 May 2004 22:23:09 -0000 1.10
> +++ module.pm 7 May 2004 01:47:13 -0000 1.11
> @@ -86,11 +86,12 @@
>
> #.so
> {
> - my $expect = Apache::BuildConfig->new->{MP_USE_STATIC} ? 0 : 1;
> - ok t_cmp($expect, Apache::Module::loaded('mod_perl.so'),
> - "Apache::Module::loaded('mod_perl.so')");
> + my $build = Apache::BuildConfig->new;
> + my $expect = $build->{MODPERL_LIB_SHARED} ? 1 : 0;
> + ok t_cmp($expect, Apache::Module::loaded('mod_perl.so'),
> + "Apache::Module::loaded('mod_perl.so')");
> }
> -
> +
> ok t_cmp(0, Apache::Module::loaded('Apache__Module__foo.so'),
> "Apache::Module::loaded('Apache__Module_foo.so')");
>
it probably has the same effect as before your change. I think the only right
solution is to use this $build->should_build_httpd thingy. So it's important
that we should an intuitive name here. How about should_link_static or similar?
--
__________________________________________________________________
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: cvs commit: modperl-2.0/t/response/TestAPI module.pm
Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
>> Remove, no, but something like this will do:
>>
>> # if no build mode is specified default to DSO
>> unless ($build->{MP_USE_DSO} or $build->{MP_USE_STATIC}) {
>> $build->{MP_USE_DSO} = 1;
>> }
>
>
> Yes, something like that. Unless you can think of something that would
> break with this change, make it so ;-)
I will leave that to your patch. You will need to add more logic to verify
that someone doesn't try to use USE_DSO and AP_CONFIG... args etc.
>> but otherwise, yes, I prefer to see $build->should_link_static used
>> there.
>
>
> That means renaming to sub should_link_static { shift->{MP_USE_STATIC} ?
> 1 : 0 }
> and then use it both in the test and in the Makefile.PL.
To start with. That will allow us to use more complex logic and it'll be all
placed in location.
> I'll resubmit a slighlity modified static build patch including that
> shortly.
Cool
__________________________________________________________________
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: cvs commit: modperl-2.0/t/response/TestAPI module.pm
Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Stas Bekman wrote:
> Philippe M. Chiasson wrote:
>
>>>> Sure, using the same method for deciding if we build static in the
>>>> test does make sense. The only problem is that I was using
>>>> MP_USE_STATIC in
>>>> it right now, so I am not sure I quite understand how MP_USE_STATIC
>>>> and MP_USE_DSO can be both set at the same time.
>>>
>>>
>>>
>>>
>>> lib/ModPerl/BuildOptions.pm:
>>>
>>> unless ($build->{MP_USE_DSO} or $build->{MP_USE_STATIC}) {
>>> $build->{MP_USE_DSO} = $build->{MP_USE_STATIC} = 1;
>>> }
>>>
>>> I suppose Doug had the plan to build mod_perl once and then be able
>>> to to decide whether to use DSO or static...
>>
>>
>>
>> Oh, damn I most certainly missed that little one. I imagine that if
>> we can remove that little bit, then USE_STATIC/USE_DSO
>> is just what is needed for $build->should_link_static then, would it
>> be ?
>
>
> Remove, no, but something like this will do:
>
> # if no build mode is specified default to DSO
> unless ($build->{MP_USE_DSO} or $build->{MP_USE_STATIC}) {
> $build->{MP_USE_DSO} = 1;
> }
Yes, something like that. Unless you can think of something that would
break with this change, make it so ;-)
> but otherwise, yes, I prefer to see $build->should_link_static used
> there.
That means renaming to sub should_link_static { shift->{MP_USE_STATIC} ?
1 : 0 }
and then use it both in the test and in the Makefile.PL.
I'll resubmit a slighlity modified static build patch including that
shortly.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: cvs commit: modperl-2.0/t/response/TestAPI module.pm
Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
>>> Sure, using the same method for deciding if we build static in the
>>> test does make sense. The only problem is that I was using
>>> MP_USE_STATIC in
>>> it right now, so I am not sure I quite understand how MP_USE_STATIC
>>> and MP_USE_DSO can be both set at the same time.
>>
>>
>>
>> lib/ModPerl/BuildOptions.pm:
>>
>> unless ($build->{MP_USE_DSO} or $build->{MP_USE_STATIC}) {
>> $build->{MP_USE_DSO} = $build->{MP_USE_STATIC} = 1;
>> }
>>
>> I suppose Doug had the plan to build mod_perl once and then be able to
>> to decide whether to use DSO or static...
>
>
> Oh, damn I most certainly missed that little one. I imagine that if we
> can remove that little bit, then USE_STATIC/USE_DSO
> is just what is needed for $build->should_link_static then, would it be ?
Remove, no, but something like this will do:
# if no build mode is specified default to DSO
unless ($build->{MP_USE_DSO} or $build->{MP_USE_STATIC}) {
$build->{MP_USE_DSO} = 1;
}
but otherwise, yes, I prefer to see $build->should_link_static used there.
--
__________________________________________________________________
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: cvs commit: modperl-2.0/t/response/TestAPI module.pm
Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Stas Bekman wrote:
> Philippe M. Chiasson wrote:
>
>> Stas Bekman wrote:
>>
>>> stas@apache.org wrote:
>>>
>>>> stas 2004/05/06 18:47:13
>>>>
>>>> Modified: t/response/TestAPI module.pm
>>>> Log:
>>>> USE_(STATIC|DSO) can be both set at the same time, try
>>>> MODPERL_LIB_SHARED
>>>> Revision Changes Path
>>>> 1.11 +5 -4 modperl-2.0/t/response/TestAPI/module.pm
>>>> Index: module.pm
>>>> ===================================================================
>>>> RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/module.pm,v
>>>> retrieving revision 1.10
>>>> retrieving revision 1.11
>>>> diff -u -u -r1.10 -r1.11
>>>> --- module.pm 6 May 2004 22:23:09 -0000 1.10
>>>> +++ module.pm 7 May 2004 01:47:13 -0000 1.11
>>>> @@ -86,11 +86,12 @@
>>>> #.so
>>>> {
>>>> - my $expect = Apache::BuildConfig->new->{MP_USE_STATIC} ? 0 : 1;
>>>> - ok t_cmp($expect, Apache::Module::loaded('mod_perl.so'),
>>>> - "Apache::Module::loaded('mod_perl.so')");
>>>> + my $build = Apache::BuildConfig->new;
>>>> + my $expect = $build->{MODPERL_LIB_SHARED} ? 1 : 0;
>>>> + ok t_cmp($expect, Apache::Module::loaded('mod_perl.so'),
>>>> + "Apache::Module::loaded('mod_perl.so')");
>>>> }
>>>> - +
>>>> ok t_cmp(0, Apache::Module::loaded('Apache__Module__foo.so'),
>>>> "Apache::Module::loaded('Apache__Module_foo.so')");
>>>>
>>>
>>>
>>>
>>>
>>> it probably has the same effect as before your change. I think the
>>> only right solution is to use this $build->should_build_httpd
>>> thingy. So it's important that we should an intuitive name here. How
>>> about should_link_static or similar?
>>>
>> Sure, using the same method for deciding if we build static in the
>> test does make sense. The only problem is that I was using
>> MP_USE_STATIC in
>> it right now, so I am not sure I quite understand how MP_USE_STATIC
>> and MP_USE_DSO can be both set at the same time.
>
>
> lib/ModPerl/BuildOptions.pm:
>
> unless ($build->{MP_USE_DSO} or $build->{MP_USE_STATIC}) {
> $build->{MP_USE_DSO} = $build->{MP_USE_STATIC} = 1;
> }
>
> I suppose Doug had the plan to build mod_perl once and then be able to
> to decide whether to use DSO or static...
Oh, damn I most certainly missed that little one. I imagine that if we
can remove that little bit, then USE_STATIC/USE_DSO
is just what is needed for $build->should_link_static then, would it be ?
> __________________________________________________________________
> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: cvs commit: modperl-2.0/t/response/TestAPI module.pm
Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> Stas Bekman wrote:
>
>> stas@apache.org wrote:
>>
>>> stas 2004/05/06 18:47:13
>>>
>>> Modified: t/response/TestAPI module.pm
>>> Log:
>>> USE_(STATIC|DSO) can be both set at the same time, try
>>> MODPERL_LIB_SHARED
>>> Revision Changes Path
>>> 1.11 +5 -4 modperl-2.0/t/response/TestAPI/module.pm
>>> Index: module.pm
>>> ===================================================================
>>> RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/module.pm,v
>>> retrieving revision 1.10
>>> retrieving revision 1.11
>>> diff -u -u -r1.10 -r1.11
>>> --- module.pm 6 May 2004 22:23:09 -0000 1.10
>>> +++ module.pm 7 May 2004 01:47:13 -0000 1.11
>>> @@ -86,11 +86,12 @@
>>> #.so
>>> {
>>> - my $expect = Apache::BuildConfig->new->{MP_USE_STATIC} ? 0 : 1;
>>> - ok t_cmp($expect, Apache::Module::loaded('mod_perl.so'),
>>> - "Apache::Module::loaded('mod_perl.so')");
>>> + my $build = Apache::BuildConfig->new;
>>> + my $expect = $build->{MODPERL_LIB_SHARED} ? 1 : 0;
>>> + ok t_cmp($expect, Apache::Module::loaded('mod_perl.so'),
>>> + "Apache::Module::loaded('mod_perl.so')");
>>> }
>>> - +
>>> ok t_cmp(0, Apache::Module::loaded('Apache__Module__foo.so'),
>>> "Apache::Module::loaded('Apache__Module_foo.so')");
>>>
>>
>>
>>
>> it probably has the same effect as before your change. I think the
>> only right solution is to use this $build->should_build_httpd thingy.
>> So it's important that we should an intuitive name here. How about
>> should_link_static or similar?
>>
> Sure, using the same method for deciding if we build static in the test
> does make sense. The only problem is that I was using MP_USE_STATIC in
> it right now, so I am not sure I quite understand how MP_USE_STATIC and
> MP_USE_DSO can be both set at the same time.
lib/ModPerl/BuildOptions.pm:
unless ($build->{MP_USE_DSO} or $build->{MP_USE_STATIC}) {
$build->{MP_USE_DSO} = $build->{MP_USE_STATIC} = 1;
}
I suppose Doug had the plan to build mod_perl once and then be able to to
decide whether to use DSO or static...
__________________________________________________________________
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: cvs commit: modperl-2.0/t/response/TestAPI module.pm
Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Stas Bekman wrote:
> stas@apache.org wrote:
>
>> stas 2004/05/06 18:47:13
>>
>> Modified: t/response/TestAPI module.pm
>> Log:
>> USE_(STATIC|DSO) can be both set at the same time, try
>> MODPERL_LIB_SHARED
>> Revision Changes Path
>> 1.11 +5 -4 modperl-2.0/t/response/TestAPI/module.pm
>> Index: module.pm
>> ===================================================================
>> RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/module.pm,v
>> retrieving revision 1.10
>> retrieving revision 1.11
>> diff -u -u -r1.10 -r1.11
>> --- module.pm 6 May 2004 22:23:09 -0000 1.10
>> +++ module.pm 7 May 2004 01:47:13 -0000 1.11
>> @@ -86,11 +86,12 @@
>> #.so
>> {
>> - my $expect = Apache::BuildConfig->new->{MP_USE_STATIC} ? 0 : 1;
>> - ok t_cmp($expect, Apache::Module::loaded('mod_perl.so'),
>> - "Apache::Module::loaded('mod_perl.so')");
>> + my $build = Apache::BuildConfig->new;
>> + my $expect = $build->{MODPERL_LIB_SHARED} ? 1 : 0;
>> + ok t_cmp($expect, Apache::Module::loaded('mod_perl.so'),
>> + "Apache::Module::loaded('mod_perl.so')");
>> }
>> - +
>> ok t_cmp(0, Apache::Module::loaded('Apache__Module__foo.so'),
>> "Apache::Module::loaded('Apache__Module_foo.so')");
>>
>
>
> it probably has the same effect as before your change. I think the
> only right solution is to use this $build->should_build_httpd thingy.
> So it's important that we should an intuitive name here. How about
> should_link_static or similar?
>
Sure, using the same method for deciding if we build static in the test
does make sense. The only problem is that I was using MP_USE_STATIC in
it right now, so I am not sure I quite understand how MP_USE_STATIC and
MP_USE_DSO can be both set at the same time.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org