On Wed, 30 Jan 2002, Stas Bekman wrote:
> Sure, be it ModPerl::Util:: function. How should it be called? Can I use
> the same code I've used for APR::Pool::from_current_request() in my orig
> post.
ModPerl::Util::default_pool();
> Take the case of the Apache::Util::ht_time wrapper. We cannot use
> Apache->request->pool without fallback, since we don't know where it's
> used. So I prefer to have one function that returns some pool for sure
> to be used in all wrappers needing this functionality. Rather than
> trying Apache->request->pool and falling back to pconf in every compat
> wrapper we need a poll.
in this case, if ht_time is used at request time without
PerlOptions +GlobalRequest, then all calls to ht_time leak into pconf.
it is also unsafe to use pconf at request time with threaded MPMs.
i doubt anybody is using ht_time() at startup. i think it would be best
to start out using Apache->request->pool here. maybe adding this in
Apache::compat.pm instead of ModPerl::Util::default_pool():
sub default_pool {
my $r = Apache->request;
die "need to configure 'PerlOptions +GlobalRequest'" unless $r;
return $r->pool;
}
after all, this function should only be used for compat wrappers.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]