Doug MacEachern wrote:
> On Thu, 20 Jun 2002, Stas Bekman wrote:
>
>
>>without this fix: Apache->warn("foo") logs:
>
>
> actually, not sure we should be supporting this at all.
>
>
>> s = modperl_global_get_server_rec();
>
>
> because using the server_rec returned by this function is not thread safe.
> ok at startup, but not at request time. could be that Apache->warn and
> Apache::warn require +GlobalRequest
But +GlobalRequest gives you $r, Apache->warn and Apache::warn currently
use $s. Do you mean to do global_request + r->server internally instead
of modperl_global_get_server_rec();?
Well, I've documented all the interfaces that do:
s = modperl_global_get_server_rec();
as to be used at the startup. Any chance (need?) we can enforce that?
I was also wondering why in the world do we need such a huge number of
ways to do the same thing?
/*
* we support the following:
* Apache::warn
* Apache->warn
* $r->warn
* $r->log_error
* Apache::Server->log_error
* $s->log_error
* Apache::Server->warn
* $s->warn
*/
I suggest moving all these to compat and leave:
* $r->warn
* $r->log_error
* $s->warn
* $s->log_error
If you want to get $s, get it explicitly via
$r->server->warn()
or if you don't have $r but do have +GlobalRequest
Apache->request->server->warn()
Is there a performance slowdown by using the above, rather than doing
the same in C, meaning that Apache->warn() is faster?
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]