|
|
Choosing A Webhost: |
Re: proposal for filter_init implementation (was: Re: rfc: new filtering AP: msg#00045apache.mod-perl.devel
Stas Bekman wrote: As we now have most of filtering API completed, it's time to finish off the filter_init API. :) Here is a proposal for filter_init implementation: cool. does this mean that the code will be available (somehow) via $f->ctx? I think that maybe there might be value in being able to do $f->ctx->{init}->(); someday :)
well, personally I like this approach the best I think. at the very least, we need this (in addition to other approaches) in order to allow module writers to make init routines mandatory (see below). as for anonymous subs, we won't be able to use them now or ever? I know there are some incomplete issues with using anonymous subs in certain areas (such as inlined in httpd.conf) but I was assuming that they would be non-issues eventually.
I don't think this is bad per se, but it cannot be othe only way. as I've said before, the init handler will be an integral part of the filter itself - in most cases you will not want to separate it from the module, since you will need it in order for the module to function properly (think managing conditional GETs). so, asking module users to do more than PerlOutputFilterHandler My::Filter seems excessive from an EU standpoint for modules that require the hook - it should be transparent. it also suggests that the [init_handler] is optional where it may not be for a given module. the flip side of this is that if you give the module writer no interface to filter_init (such as solution #1) then module writers have no way to make the init routine required. yucko.
as an aside, is there any reason you keep using input filters as the example? I haven't looked over the input filter design as much as with output filters, but filter_init was added specifically for handling conditional GET requests with output filters - I'm not sure what value there is for input filters, or even if the input filter Apache mechanism supports it. but if it does, cool :) --Geoff
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | proposal for filter_init implementation (was: Re: rfc: new filtering APIs), Stas Bekman |
|---|---|
| Next by Date: | Re: proposal for filter_init implementation (was: Re: rfc: new filtering APIs), Stas Bekman |
| Previous by Thread: | proposal for filter_init implementation (was: Re: rfc: new filtering APIs), Stas Bekman |
| Next by Thread: | Re: proposal for filter_init implementation (was: Re: rfc: new filtering APIs), Stas Bekman |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |