perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: Apache::SizeLimit for mp2?
Date Mon, 06 Dec 2004 19:49:26 GMT
Perrin Harkins wrote:
>>I've massaged a bit more the ported SizeLimit.pm, but I've a question
>>regarding:
>>
>>sub setmax {
>>     $MAX_PROCESS_SIZE = shift;
>>     my $r = Apache->request();
>>
>>and similar:
>>
>>sub setmin {
>>sub setmax_unshared {
>>
>>Since Apache->request() is not longer available by default, should we
>>change the API to pass $r as the first argument? or may be the second?
>>
>>setmax($MAX_PROCESS_SIZE, $r);
>>setmax($MAX_PROCESS_SIZE); # here will try to use Apache->request()
> 
> 
> I did that, but then I took it out.  Those subs are only meant to be
> called from ModPerl::Registry and friends.  In that situation, you have
> Apache->request() by default in a prefork environment, don't you?  As a
> result of SetHandler perl-script?

No. Because one can disable that:
http://perl.apache.org/docs/2.0/user/config/config.html#C_GlobalRequest_
Moreover M-R works just fine with 'modperl' SetHandler if you use $r methods.

> If you want to put it back in, that's fine.  The docs would need to
> mention it though.

Certainly.

> I had a separate question about the cleanup handler.  I used
> $r->connection->pool->register_cleanup(), but I wonder if I should have
> used $r->pool->register_cleanup() instead to make it check after every
> request.  Thoughts?

Yes, I must be $r->pool. Try your commit rights again?

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


Mime
View raw message