Geoffrey Young wrote:
First of all you can always do:
Finally, other than add/remove filters APIs which we have talked about, what other APIs do you want for filters?
is there an interface to filter_init?
see the discussion on
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9673
or CHANGES file for a description of why it was added.
this API may be crucial to mod_perl developers who want to handle conditional GET requests properly with their filters.
unless ($filter->ctx) {
# filter is called for the first time
# and this code won't be run only once
$filter->ctx(1);
}
so if you want to do something once, or e.g. remove yourself you can do it in this block. So it seems to be similar to filter_init. Or am I wrong here? I agree that having a dedicated filter_init seems to be cleaner and probably more efficient.
If filter_init is wanted, how should it be set by the Perl code? Using an optional second argument to the filter configuration?
PerlOutputFilterHandler MyFilter MyFilter::init
Also can you please give me some useful test I can play with? Probably one of the examples from your book will do ;)
Thanks Geoff.
__________________________________________________________________
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