You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2004/08/18 05:24:40 UTC
[mp2] $r->document_root
At the moment $r->document_root is a 1:1 mapping to ap_document_root,
which only gives you the value, and doesn't allow you to set it.
As Dave (CC'ed) pointed out, some people already want to use it as they
did in mp1, i.e. set it to some value.
The problem of allowing the setting of doc_root (forgetting to reset it
back) was always there, now it's got even worse. Even if you handle all
the aspects of locking under threads, changing the server config structure
will affect all threads, doesn't it? In which case it's a no-no (at least
for threads).
So far the previous discussions on this topic were:
http://mathforum.org/epigone/modperl-dev/pehcroner/3F49FB90.5030500@modperlcookbook.org
http://mathforum.org/epigone/modperl-dev/swirelplu
So what should we do about it?
I suppose we could make it get/set at startup time and get/set at all
times for non-threaded mpms and only get for threaded mpms, like we did
with a few other struct accessors (to see those run):
grep -Ir '\$' xs/maps/
it sounds like document_root falls into the same group as all the
accessors above. Or doesn't it?
--
__________________________________________________________________
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: [mp2] $r->document_root
Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>>So what should we do about it?
>>
>>I suppose we could make it get/set at startup time
>
>
> perhaps, but most people have asked for writability at request time, not
> startup time.
>
>
>>and get/set at all
>>times for non-threaded mpms and only get for threaded mpms, like we did
>>with a few other struct accessors (to see those run):
>>
>>grep -Ir '\$' xs/maps/
>>
>>it sounds like document_root falls into the same group as all the
>>accessors above. Or doesn't it?
>
>
> I don't ever claim to understand threads, but if there is a mechanism in
> place to have ro for threaded mpms and rw for prefork then I think that's a
> good way to go at the moment.
Right, but before that I think what needs to be checked is mod_userdir,
since it's supposed to somehow let the other parts of Apache know of a
different document root.
I think the idea we had before is to extend $r to have a private entry of
document_root, so it can be per-request. Of course that mod_perl-specific
entry will be visible only to mod_perl modules.
--
__________________________________________________________________
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: [mp2] $r->document_root
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> So what should we do about it?
>
> I suppose we could make it get/set at startup time
perhaps, but most people have asked for writability at request time, not
startup time.
> and get/set at all
> times for non-threaded mpms and only get for threaded mpms, like we did
> with a few other struct accessors (to see those run):
>
> grep -Ir '\$' xs/maps/
>
> it sounds like document_root falls into the same group as all the
> accessors above. Or doesn't it?
I don't ever claim to understand threads, but if there is a mechanism in
place to have ro for threaded mpms and rw for prefork then I think that's a
good way to go at the moment.
--Geoff
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org