Geoffrey Young wrote:
[...]
I see your point that we can't allocate from the server pool each time, and
I guess why the current situation is bad is because the PV will go out of
scope at the end of the request leaving a bad pointer around, right?

Not only that. It may have an immediate affect if you use a TMP scalar, which is the case when you don't pass a lexical variable as an argument but a return value from another call (as it was in the original bug report). Moreover, if it is a lexical, if it's changed later the entry in the server rec will be changed too.


still, I don't see that we need to go the whole
_modperl_private::apache_server_admin route for these fields.  error_fname
is one that comes to mind as being especially useless to modify - it might
be (and is) useful to read, but it's useless at request time since the
error_log fd is opened and forgotten about long before then.  maybe it makes
sense to offer write access during open_logs or something, but at that point
the PV wouldn't go out of scope, right?

It doesn't make any difference when you allow it. The current implementation is problematic as explained above. You *have* to copy that string, unless you can somehow ensure that it's not a TMP and it's not modified later on. And you can't use the pool, since you will get leaks.


If we go with this one, should we use some obscure name space for this
kind of stashing? We don't really want to support more APIs, do we? and
using the "Apache::ServerRec::ServerAdmin" is something that people will
discover and certainly use. Which of course could be a good thing too,
as it'll be faster, but on the other hand it won't be set unless a user
has modified $s->server_admin. That's why I think it should be hidden
into something like: $_modperl_private::apache_server_admin

I'm not opposed to that. I was just offering some thoughts off the top of my head :)

Thanks Geoff!

I just thought to use a namespace which is the least likely that someone will want to use.


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



Reply via email to