You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Eric Cholet <ch...@logilune.com> on 2005/01/05 15:49:21 UTC
BSD::Resource needed on BSD systems
Hi,
Fresh svn checkout of mp2 / apache 2.0 on MacOSX 10.3.
'make test' fails to start the server. t/logs/error_log reveals that
Apache::SizeLimit
wants BSD::Resource which wasn't installed on my system.
} elsif (BSD_LIKE) {
# will getrusage work on all BSDs? I should hope so.
if ( eval { require BSD::Resource } ) {
$HOW_BIG_IS_IT = \&bsd_size_check;
} else {
die "you must install BSD::Resource for Apache::SizeLimit "
.
"to work on your platform.";
}
Perhaps it would be nicer if this could be detected earlier,
unfortunately I'm
still way too clueless to provide a patch.
--
Eric Cholet
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: BSD::Resource needed on BSD systems
Posted by Vivek Khera <kh...@kcilink.com>.
On Jan 5, 2005, at 9:49 AM, Eric Cholet wrote:
> Perhaps it would be nicer if this could be detected earlier,
> unfortunately I'm
> still way too clueless to provide a patch.
>
I never noticed this since I always load BSD::Resource when I set up a
perl installation :-)
Vivek Khera, Ph.D.
+1-301-869-4449 x806
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: BSD::Resource needed on BSD systems
Posted by Stas Bekman <st...@stason.org>.
Perrin Harkins wrote:
> On Wed, 2005-01-05 at 11:07 -0500, Stas Bekman wrote:
>
>>that's misleading. The platform is supported. I see nothing wrong with
>>having different error messages.
>
>
> I was just thinking of making it easier to test, but you're right, it's
> not as clear a message.
>
>
>>How about just:
>>
>> croak "Unsupported platform: $^O";
>
>
> Because it's a croak, I think it needs to say "Apache::SizeLimit" in
> there.
You are correct. I haven't thought of that. May be just leave die then?
> I'll make the changes to use croak and just leave it at that. I'll also
> look at moving this from the startup into an official test, so that you
> would get a "skipped" on unsupported platforms. It would still just
> test loading the module, but it would be less confusing I think.
sure
--
__________________________________________________________________
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: BSD::Resource needed on BSD systems
Posted by Perrin Harkins <pe...@elem.com>.
On Wed, 2005-01-05 at 11:07 -0500, Stas Bekman wrote:
> that's misleading. The platform is supported. I see nothing wrong with
> having different error messages.
I was just thinking of making it easier to test, but you're right, it's
not as clear a message.
> How about just:
>
> croak "Unsupported platform: $^O";
Because it's a croak, I think it needs to say "Apache::SizeLimit" in
there.
I'll make the changes to use croak and just leave it at that. I'll also
look at moving this from the startup into an official test, so that you
would get a "skipped" on unsupported platforms. It would still just
test loading the module, but it would be less confusing I think.
- Perrin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: BSD::Resource needed on BSD systems
Posted by Stas Bekman <st...@stason.org>.
Perrin Harkins wrote:
> On Wed, 2005-01-05 at 10:43 -0500, Stas Bekman wrote:
>
>>Perrin Harkins wrote:
>>
>>>I can standardize these messages if it will help.
>>
>>What do you mean? Patch?
> Index: SizeLimit.pm
> ===================================================================
> --- SizeLimit.pm (revision 124221)
> +++ SizeLimit.pm (working copy)
> @@ -16,6 +16,7 @@
>
> use strict;
> use warnings FATAL => 'all';
> +use Carp qw(croak);
>
> use mod_perl 1.99;
>
> @@ -46,7 +47,7 @@
>
> BEGIN {
>
> - die "Apache::SizeLimit at the moment works only with non-threaded
> MPMs"
> + croak "Apache::SizeLimit at the moment works only with non-threaded
> MPMs"
> if Apache::MPM->is_threaded();
>
> # decide at compile time how to check for a process' memory size.
> @@ -64,8 +65,8 @@
> if ( eval { require BSD::Resource } ) {
> $HOW_BIG_IS_IT = \&bsd_size_check;
> } else {
> - die "you must install BSD::Resource for Apache::SizeLimit
> " .
> - "to work on your platform.";
> + croak "Unsupported platform: you must install BSD::Resource
> " .
> + "for Apache::SizeLimit to work on your platform.";
> }
that's misleading. The platform is supported. I see nothing wrong with
having different error messages. How about:
"Missing prerequisite: BSD::Resource"
> # Currently unsupported for mp2 because of threads...
> @@ -74,13 +75,14 @@
> # if ( eval { require Win32::API } ) {
> # $HOW_BIG_IS_IT = \&win32_size_check;
> # } else {
> -# die "you must install Win32::API for Apache::SizeLimit
> " .
> -# "to work on your platform.";
> +# croak "Unsupported platform: you must install Win32::API
> "
> +# "for Apache::SizeLimit to work on your platform.";
> # }
same here.
> } else {
>
> - die "Apache::SizeLimit not implemented on $^O";
> + croak "Unsupported platform: Apache::SizeLimit not implemented
> " .
> + "on $^O";
How about just:
croak "Unsupported platform: $^O";
--
__________________________________________________________________
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: BSD::Resource needed on BSD systems
Posted by Perrin Harkins <pe...@elem.com>.
On Wed, 2005-01-05 at 10:43 -0500, Stas Bekman wrote:
> Perrin Harkins wrote:
> > I can standardize these messages if it will help.
>
> What do you mean? Patch?
Index: SizeLimit.pm
===================================================================
--- SizeLimit.pm (revision 124221)
+++ SizeLimit.pm (working copy)
@@ -16,6 +16,7 @@
use strict;
use warnings FATAL => 'all';
+use Carp qw(croak);
use mod_perl 1.99;
@@ -46,7 +47,7 @@
BEGIN {
- die "Apache::SizeLimit at the moment works only with non-threaded
MPMs"
+ croak "Apache::SizeLimit at the moment works only with non-threaded
MPMs"
if Apache::MPM->is_threaded();
# decide at compile time how to check for a process' memory size.
@@ -64,8 +65,8 @@
if ( eval { require BSD::Resource } ) {
$HOW_BIG_IS_IT = \&bsd_size_check;
} else {
- die "you must install BSD::Resource for Apache::SizeLimit
" .
- "to work on your platform.";
+ croak "Unsupported platform: you must install BSD::Resource
" .
+ "for Apache::SizeLimit to work on your platform.";
}
# Currently unsupported for mp2 because of threads...
@@ -74,13 +75,14 @@
# if ( eval { require Win32::API } ) {
# $HOW_BIG_IS_IT = \&win32_size_check;
# } else {
-# die "you must install Win32::API for Apache::SizeLimit
" .
-# "to work on your platform.";
+# croak "Unsupported platform: you must install Win32::API
"
+# "for Apache::SizeLimit to work on your platform.";
# }
} else {
- die "Apache::SizeLimit not implemented on $^O";
+ croak "Unsupported platform: Apache::SizeLimit not implemented
" .
+ "on $^O";
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: BSD::Resource needed on BSD systems
Posted by Stas Bekman <st...@stason.org>.
Perrin Harkins wrote:
> On Wed, 2005-01-05 at 09:56 -0500, Stas Bekman wrote:
>
>>Ay, for some reason I thought that this was tested for. Pleaes try this patch:
>>
>>Index: t/conf/post_config_startup.pl
>>===================================================================
>>--- t/conf/post_config_startup.pl (revision 124181)
>>+++ t/conf/post_config_startup.pl (working copy)
>>@@ -69,7 +69,8 @@
>> eval { require Apache::SizeLimit };
>> if ($@) {
>> # unsupported platform
>>- die $@ unless $@ =~ /Apache::SizeLimit not implemented on/;
>>+ die $@ unless $@ =~ /Apache::SizeLimit not implemented on/
>>+ or $@ =~ /you must install BSD::Resource/;
>> }
>> }
>
>
> I can standardize these messages if it will help.
What do you mean? Patch?
--
__________________________________________________________________
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: BSD::Resource needed on BSD systems
Posted by Perrin Harkins <pe...@elem.com>.
On Wed, 2005-01-05 at 09:56 -0500, Stas Bekman wrote:
> Ay, for some reason I thought that this was tested for. Pleaes try this patch:
>
> Index: t/conf/post_config_startup.pl
> ===================================================================
> --- t/conf/post_config_startup.pl (revision 124181)
> +++ t/conf/post_config_startup.pl (working copy)
> @@ -69,7 +69,8 @@
> eval { require Apache::SizeLimit };
> if ($@) {
> # unsupported platform
> - die $@ unless $@ =~ /Apache::SizeLimit not implemented on/;
> + die $@ unless $@ =~ /Apache::SizeLimit not implemented on/
> + or $@ =~ /you must install BSD::Resource/;
> }
> }
I can standardize these messages if it will help.
- Perrin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: BSD::Resource needed on BSD systems
Posted by Stas Bekman <st...@stason.org>.
Eric Cholet wrote:
> Le 5 janv. 05, à 16:37, Stas Bekman a écrit :
>
>>
>>> t/modules/apache_resource...............skipped
>>> all skipped: cannot find module 'BSD::Resource'
>>
>>
>> ah, right, now I understand why I thought we were already testing for it.
>>
>>> Is the above related to Apache::SizeLimit? In any case it'd be nicer if
>>> this could be detected earlier, at perl Makefile.PL or compile time.
>>
>>
>> No, it's an Apache::Resource test
>
>
> I thought so too, but nothing in the test output suggests SizeLimit was
> tested:
It's not tested at run time, we just test that it's loaded. Feel free to
submit a patch/post an idea how to add a test for A-SL w/o disrupting the
rest of the test suite.
>> What do you mean detected? Like offer you a list of optional modules?
>> We have discussed that, but didn't arrive to any firm plan on how the
>> best to do it. How do you propose we deal with that?
>
>
> Uh, sorry, I don't have any proposals, I'm new here :) From the other
> posts on this thread I understand that this it is not practical or
> feasible to detect this at compile time.
My proposal was to somehow report to users the optional modules during
'perl Makefile.PL' (.e.g Module::Build (or is it Module::Install) seems to
provide this functionality. When running CPANPLUS it suggests to install
optional modules. I don't know how to do it with MakeMaker.
--
__________________________________________________________________
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: BSD::Resource needed on BSD systems
Posted by Perrin Harkins <pe...@elem.com>.
On Wed, 2005-01-05 at 17:01 +0100, Eric Cholet wrote:
> From the other
> posts on this thread I understand that this it is not practical or
> feasible to detect this at compile time.
It could be done, but SizeLimit is not required for mod_perl to work,
and mod_perl supports platforms that SizeLimit doesn't, so it's not
clear what we would do at compile time other than issue a warning.
- Perrin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: BSD::Resource needed on BSD systems
Posted by Eric Cholet <ch...@logilune.com>.
Le 5 janv. 05, à 16:37, Stas Bekman a écrit :
>
>> t/modules/apache_resource...............skipped
>> all skipped: cannot find module 'BSD::Resource'
>
> ah, right, now I understand why I thought we were already testing for
> it.
>
>> Is the above related to Apache::SizeLimit? In any case it'd be nicer
>> if
>> this could be detected earlier, at perl Makefile.PL or compile time.
>
> No, it's an Apache::Resource test
I thought so too, but nothing in the test output suggests SizeLimit was
tested:
t/apache/add_config.....................ok
t/apache/cgihandler.....................ok
t/apache/conftree.......................ok
t/apache/constants......................ok
t/apache/content_length_header..........ok
t/apache/discard_rbody..................ok
t/apache/post...........................ok
t/apache/read...........................ok
t/apache/read2..........................ok
t/apache/scanhdrs.......................ok
t/apache/scanhdrs2......................ok
t/apache/send_cgi_header................ok
t/apache/subprocess.....................ok
t/apache/util...........................ok
t/apache/write..........................ok
t/api/access............................ok
t/api/access2...........................ok
t/api/aplog.............................ok
t/api/command...........................ok
t/api/conn_rec..........................ok
t/api/conn_util.........................ok
t/api/content_encoding..................ok
t/api/custom_response...................ok
t/api/err_headers_out...................ok
t/api/in_out_filters....................ok
t/api/internal_redirect.................ok
t/api/internal_redirect_handler.........ok
t/api/lookup_misc.......................ok
t/api/lookup_uri........................ok
t/api/lookup_uri2.......................ok
t/api/module............................ok
t/api/process...........................ok
t/api/query.............................ok
t/api/request_rec.......................ok
t/api/request_subclass..................ok
t/api/request_util......................ok
t/api/response..........................ok
t/api/rflush............................ok
t/api/sendfile..........................ok
t/api/server_const......................ok
t/api/server_rec........................ok
t/api/server_util.......................ok
t/api/show..............................ok
t/api/slurp_filename....................ok
t/api/status............................ok
t/api/sub_request.......................ok
t/api/uri...............................ok
t/apr-ext/base64........................ok
t/apr-ext/bucket........................ok
t/apr-ext/date..........................ok
t/apr-ext/finfo.........................ok
2/27 skipped: different file semantics
t/apr-ext/perlio........................ok
t/apr-ext/pool..........................ok
t/apr-ext/string........................ok
t/apr-ext/table.........................ok
t/apr-ext/threadmutex...................ok
t/apr-ext/uri...........................ok
t/apr-ext/util..........................ok
t/apr-ext/uuid..........................ok
t/apr/base64............................ok
t/apr/brigade...........................ok
t/apr/bucket............................ok
t/apr/constants.........................ok
t/apr/date..............................ok
t/apr/finfo.............................ok
2/28 skipped: different file semantics
t/apr/flatten...........................ok
t/apr/ipsubnet..........................ok
t/apr/os................................ok
t/apr/perlio............................ok
t/apr/pool..............................ok
t/apr/pool_lifetime.....................ok
t/apr/sockaddr..........................ok
t/apr/socket............................ok
t/apr/string............................ok
t/apr/table.............................ok
t/apr/threadmutex.......................ok
t/apr/uri...............................ok
t/apr/util..............................ok
t/apr/uuid..............................ok
t/compat/apache.........................ok
t/compat/apache_file....................ok
t/compat/apache_module..................ok
t/compat/apache_table...................ok
t/compat/apache_uri.....................ok
t/compat/apache_util....................ok
t/compat/conn_authen....................ok
t/compat/conn_rec.......................ok
t/compat/request........................ok
t/compat/request_body...................ok
t/compat/send_fd........................ok
t/directive/cmdparms....................ok
t/directive/env.........................ok
t/directive/perl........................ok
t/directive/perldo......................ok
t/directive/perlloadmodule..............ok
t/directive/perlloadmodule2.............ok
t/directive/perlloadmodule3.............ok
t/directive/perlloadmodule4.............ok
t/directive/perlloadmodule5.............ok
t/directive/perlloadmodule6.............ok
t/directive/perlmodule..................ok
t/directive/perlrequire.................ok
t/directive/pod.........................ok
t/directive/setupenv....................ok
t/error/api.............................ok
t/error/runtime.........................ok
t/error/syntax..........................ok
t/filter/both_str_con_add...............ok
t/filter/both_str_native_remove.........ok
t/filter/both_str_req_add...............ok
t/filter/both_str_req_mix...............ok
t/filter/both_str_req_proxy.............ok
t/filter/in_autoload....................ok
t/filter/in_bbs_body....................ok
t/filter/in_bbs_consume.................ok
t/filter/in_bbs_inject_header...........ok
t/filter/in_bbs_msg.....................ok
t/filter/in_bbs_underrun................ok
t/filter/in_error.......................ok
t/filter/in_init_basic..................ok
t/filter/in_str_bin_data................ok
t/filter/in_str_consume.................ok
t/filter/in_str_declined................ok
t/filter/in_str_lc......................ok
t/filter/in_str_msg.....................ok
t/filter/in_str_sandwich................ok
t/filter/out_apache.....................ok
t/filter/out_bbs_basic..................ok
t/filter/out_bbs_ctx....................ok
t/filter/out_bbs_filebucket.............ok
t/filter/out_init_basic.................ok
t/filter/out_str_api....................ok
t/filter/out_str_ctx....................ok
t/filter/out_str_declined...............ok
t/filter/out_str_eval...................ok
t/filter/out_str_lc.....................ok
t/filter/out_str_remove.................ok
t/filter/out_str_req_eos................ok
t/filter/out_str_req_mix................ok
t/filter/out_str_reverse................ok
t/filter/out_str_subreq_default.........ok
t/filter/out_str_subreq_modperl.........ok
t/hooks/access..........................ok
t/hooks/authen_basic....................ok
t/hooks/authen_digest...................ok
t/hooks/authz...........................ok
t/hooks/cleanup.........................ok
t/hooks/cleanup2........................ok
t/hooks/fixup...........................ok
t/hooks/headerparser....................ok
t/hooks/hookrun.........................ok
t/hooks/init............................ok
t/hooks/inlined_handlers................ok
t/hooks/push_handlers...................ok
t/hooks/push_handlers_blessed...........ok
t/hooks/push_handlers_same_phase........ok
t/hooks/set_handlers....................ok
t/hooks/stacked_handlers................ok
t/hooks/stacked_handlers2...............ok
t/hooks/startup.........................ok
t/hooks/trans...........................ok
t/modperl/cookie........................ok
t/modperl/cookie2.......................ok
t/modperl/current_callback..............ok
t/modperl/dir_config....................ok
t/modperl/endav.........................ok
t/modperl/env...........................ok
t/modperl/exit..........................ok
t/modperl/getc..........................ok
t/modperl/io_nested_with_closed_stds....ok
t/modperl/io_with_closed_stds...........ok
t/modperl/merge.........................ok
t/modperl/merge2........................ok
t/modperl/merge3........................ok
t/modperl/method........................ok
t/modperl/methodname....................ok
t/modperl/methodobj.....................ok
t/modperl/perl..........................ok
t/modperl/perl_options..................ok
t/modperl/pnotes........................ok
t/modperl/post_utf8.....................ok
t/modperl/print.........................ok
t/modperl/print_utf8....................ok
t/modperl/print_utf8_2..................ok
t/modperl/printf........................ok
t/modperl/readline......................ok
t/modperl/request_rec_perlio_api........ok
t/modperl/request_rec_tie_api...........skipped
all skipped: perl 5.008001: PerlIO is used instead of TIEd IO
t/modperl/sameinterp....................ok
t/modperl/setauth.......................ok
t/modperl/setupenv......................ok
t/modperl/status........................ok
t/modperl/subenv........................ok
t/modperl/taint.........................ok
t/modperl/util..........................ok
t/modules/apache_resource...............skipped
all skipped: cannot find module 'BSD::Resource'
t/modules/apache_status.................ok
t/modules/cgi...........................ok
t/modules/cgi2..........................skipped
all skipped: CGI version 3.01 or higher is required
t/modules/cgipost.......................ok
t/modules/cgipost2......................skipped
all skipped: CGI version 3.01 or higher is required
t/modules/cgiupload.....................ok
t/modules/cgiupload2....................skipped
all skipped: CGI version 3.01 or higher is required
t/modules/include.......................ok
t/modules/include2......................ok
t/modules/include_subreq................ok
t/modules/proxy.........................ok
t/modules/reload........................ok
t/perl/api..............................ok
t/perl/hash_attack......................skipped
all skipped: relevant only for perl 5.8.2 and higher
t/perl/ithreads.........................ok
t/perl/ithreads2........................ok
t/perl/signals..........................FAILED before any test output
arrived
t/preconnection/note....................ok
t/protocol/echo_bbs.....................ok
t/protocol/echo_bbs2....................ok
t/protocol/echo_block...................ok
t/protocol/echo_filter..................ok
t/protocol/echo_nonblock................ok
t/protocol/echo_timeout.................ok
t/protocol/eliza........................skipped
all skipped: cannot find module 'Chatbot::Eliza'
t/protocol/pseudo_http..................ok
t/user/rewrite..........................ok
t/vhost/config..........................ok
t/vhost/log.............................ok
> What do you mean detected? Like offer you a list of optional modules?
> We have discussed that, but didn't arrive to any firm plan on how the
> best to do it. How do you propose we deal with that?
Uh, sorry, I don't have any proposals, I'm new here :) From the other
posts on this thread I understand that this it is not practical or
feasible to detect this at compile time.
--
Eric Cholet
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: BSD::Resource needed on BSD systems
Posted by Stas Bekman <st...@stason.org>.
Eric Cholet wrote:
> Le 5 janv. 05, à 15:56, Stas Bekman a écrit :
>
>> Eric Cholet wrote:
>>
>>> Hi,
>>> Fresh svn checkout of mp2 / apache 2.0 on MacOSX 10.3.
>>> 'make test' fails to start the server. t/logs/error_log reveals that
>>> Apache::SizeLimit
>>> wants BSD::Resource which wasn't installed on my system.
>>> } elsif (BSD_LIKE) {
>>> # will getrusage work on all BSDs? I should hope so.
>>> if ( eval { require BSD::Resource } ) {
>>> $HOW_BIG_IS_IT = \&bsd_size_check;
>>> } else {
>>> die "you must install BSD::Resource for Apache::SizeLimit
>>> " .
>>> "to work on your platform.";
>>> }
>>> Perhaps it would be nicer if this could be detected earlier,
>>> unfortunately I'm
>>> still way too clueless to provide a patch.
>>
>>
>> Ay, for some reason I thought that this was tested for. Pleaes try
>> this patch:
>>
>> Index: t/conf/post_config_startup.pl
>> ===================================================================
>> --- t/conf/post_config_startup.pl (revision 124181)
>> +++ t/conf/post_config_startup.pl (working copy)
>> @@ -69,7 +69,8 @@
>> eval { require Apache::SizeLimit };
>> if ($@) {
>> # unsupported platform
>> - die $@ unless $@ =~ /Apache::SizeLimit not implemented on/;
>> + die $@ unless $@ =~ /Apache::SizeLimit not implemented on/
>> + or $@ =~ /you must install BSD::Resource/;
>> }
>> }
>
>
> With this patch the server starts and "make test" runs
Thanks committed.
> t/modules/apache_resource...............skipped
> all skipped: cannot find module 'BSD::Resource'
ah, right, now I understand why I thought we were already testing for it.
> Is the above related to Apache::SizeLimit? In any case it'd be nicer if
> this could be detected earlier, at perl Makefile.PL or compile time.
No, it's an Apache::Resource test
What do you mean detected? Like offer you a list of optional modules? We
have discussed that, but didn't arrive to any firm plan on how the best to
do it. How do you propose we deal with that?
--
__________________________________________________________________
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: BSD::Resource needed on BSD systems
Posted by Eric Cholet <ch...@logilune.com>.
Le 5 janv. 05, à 15:56, Stas Bekman a écrit :
> Eric Cholet wrote:
>> Hi,
>> Fresh svn checkout of mp2 / apache 2.0 on MacOSX 10.3.
>> 'make test' fails to start the server. t/logs/error_log reveals that
>> Apache::SizeLimit
>> wants BSD::Resource which wasn't installed on my system.
>> } elsif (BSD_LIKE) {
>> # will getrusage work on all BSDs? I should hope so.
>> if ( eval { require BSD::Resource } ) {
>> $HOW_BIG_IS_IT = \&bsd_size_check;
>> } else {
>> die "you must install BSD::Resource for Apache::SizeLimit
>> " .
>> "to work on your platform.";
>> }
>> Perhaps it would be nicer if this could be detected earlier,
>> unfortunately I'm
>> still way too clueless to provide a patch.
>
> Ay, for some reason I thought that this was tested for. Pleaes try
> this patch:
>
> Index: t/conf/post_config_startup.pl
> ===================================================================
> --- t/conf/post_config_startup.pl (revision 124181)
> +++ t/conf/post_config_startup.pl (working copy)
> @@ -69,7 +69,8 @@
> eval { require Apache::SizeLimit };
> if ($@) {
> # unsupported platform
> - die $@ unless $@ =~ /Apache::SizeLimit not implemented on/;
> + die $@ unless $@ =~ /Apache::SizeLimit not implemented on/
> + or $@ =~ /you must install BSD::Resource/;
> }
> }
With this patch the server starts and "make test" runs
t/modules/apache_resource...............skipped
all skipped: cannot find module 'BSD::Resource'
Is the above related to Apache::SizeLimit? In any case it'd be nicer if
this could be detected earlier, at perl Makefile.PL or compile time.
--
Eric Cholet
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: BSD::Resource needed on BSD systems
Posted by Stas Bekman <st...@stason.org>.
Eric Cholet wrote:
> Hi,
>
> Fresh svn checkout of mp2 / apache 2.0 on MacOSX 10.3.
>
> 'make test' fails to start the server. t/logs/error_log reveals that
> Apache::SizeLimit
> wants BSD::Resource which wasn't installed on my system.
>
> } elsif (BSD_LIKE) {
>
> # will getrusage work on all BSDs? I should hope so.
> if ( eval { require BSD::Resource } ) {
> $HOW_BIG_IS_IT = \&bsd_size_check;
> } else {
> die "you must install BSD::Resource for Apache::SizeLimit " .
> "to work on your platform.";
> }
>
> Perhaps it would be nicer if this could be detected earlier,
> unfortunately I'm
> still way too clueless to provide a patch.
Ay, for some reason I thought that this was tested for. Pleaes try this patch:
Index: t/conf/post_config_startup.pl
===================================================================
--- t/conf/post_config_startup.pl (revision 124181)
+++ t/conf/post_config_startup.pl (working copy)
@@ -69,7 +69,8 @@
eval { require Apache::SizeLimit };
if ($@) {
# unsupported platform
- die $@ unless $@ =~ /Apache::SizeLimit not implemented on/;
+ die $@ unless $@ =~ /Apache::SizeLimit not implemented on/
+ or $@ =~ /you must install BSD::Resource/;
}
}
--
__________________________________________________________________
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: BSD::Resource needed on BSD systems
Posted by Perrin Harkins <pe...@elem.com>.
On Wed, 2005-01-05 at 15:49 +0100, Eric Cholet wrote:
> Perhaps it would be nicer if this could be detected earlier
It can't be detected earlier in SizeLimit -- it already happens in a
BEGIN block. The server should simply report a warning for SizeLimit
and continue though.
- Perrin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org