Jonathan Vanasco wrote:
I'm guessing/hoping that this just stores a hashref to the current
request object?
Not exactly. It stores a global object. Which is why this is SLOW in threads
because it has to CLONE() it between them.
static MP_INLINE
request_rec *mpxs_Apache2__RequestUtil_request(pTHX_ SV *classname, SV *svr)
{
/* ignore classname */
return modperl_global_request(aTHX_ svr);
}
/* get/set */
request_rec *modperl_global_request(pTHX_ SV *svr)
{
request_rec *cur = NULL;
apr_status_t status = modperl_tls_get_request_rec(&cur);
if (status != APR_SUCCESS) {
/* an internal problem */
Perl_croak(aTHX_ "failed to retrieve the request object");
}
if (GIMME_V != G_VOID && !cur) {
/* wrong configuration */
Perl_croak(aTHX_ "Global $r object is not available. Set:\n"
"\tPerlOptions +GlobalRequest\nin httpd.conf");
}
if (svr) {
modperl_global_request_obj_set(aTHX_ svr);
}
return cur;
}
--
------------------------------------------------------------------------
Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F
"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."