Philippe M. Chiasson wrote: [...]
For instance, for each request, we create a modperl_request_pool() and $r->pool returns that,
not the underlying $r->pool. We just register a cleanup handler with $r->pool to destroy our
request pool, but use a refcount technique to figure out if the pool can be safely freed. If not,
we either die verbosely, or just warn about it
"Warning: prolonging the lifetime of request pool at foo/bar.pl line 232"
Certainly possible to implement, but I am just not sure we can justify this added magic/complexity
simply for the sake of catching improper uses of the API.
Too complicated. It's not worth the very small probability of people writing this kind of really bad code.
Unfortunately it doesn't seem like this dependency code can be easily integrated with the automatic type conversion, because the code accepts a single argument in xs/modperl_xs_sv_convert.h.
I am not sure about this one, but couldn't we use our fancy XS generation framerowk
to magically detect methods with a pool argument and facilitate this somewhat ?
At the moment we will need to rewrite all methods that accept the pool object, like I did for APR::Table::make above. for example inside APR::Table there are also copy() and overlay() that need the same solution.
And that sounds like a terrible idea to me, unless we can make it really tiny,
like a single macro or sth. Still, I think it would be much more error-prone than
figuring this out somewhat automatically. If the typemap stuff isn't sufficient,
why can't we just implement our own sort of meta-typemap from all the neat data
we got in xs/tables ?
I'll give it a try.
-- __________________________________________________________________ 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]
