Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: [patch] filter_init implementation: msg#00071

apache.mod-perl.devel

Subject: Re: [patch] filter_init implementation

Geoffrey Young wrote:

Hmm, I'm puzzled how did it work for me at all! The filter handler was bogus. Do you still have a segfault if you replace it with:


yes, that worked. nice.

Great!

>> FilterPreHandler? it's really preprocessing that is going on here, so
>> maybe that's more descriptive than anything 'init' based. I agree now
>> more than ever that filter_init is a really bad name, and will have
>> misleading connotations for Perl developers, who expect different
>> things from initialization routines :)
>
> Sounds fine with me. So we do design a new phase missing from Apache ;)
> Those who want to do filter initialization can use $f->ctx.
>
> The question still stands. Do we want:
>
> sub init {}
> sub filt : FilterRequestHandler FilterPreHandler(init) {}
>
> or
>
> sub init : FilterPreHandler {}
> sub filt : FilterRequestHandler FilterNeedsPreHandler(init) {}

the first seems to make the most sense to me - I don't see why we need to make the pre handler take an attribute only to create another attribute to run it.

Well, I agree with you. It's just that I don't feel very happy about linguistics. Currently attributes indentify the properties of the filters. FilterPreHandler(init) has nothing to do with the real filter, other than creating a dependency. But I guess it's just a matter of getting used to it. However if you see what I mean, won't FilterRunsPreHandler(init) sound more like a property:

sub filt : FilterRequestHandler FilterRunsPreHandler(init) {}

So in English we can say that filter 'filt' is a request filter handler that runs prehandler 'init'.

Whereas FilterPreHandler can thought as being the prehandler.

See what I mean?

Also:

sub init : FilterPreHandler {}

makes it sure that that sub won't be used in any other way, than designed. But that could be redundant I suppose.

> Anyways, I've changed a bit the expectations and the response handler
> and voila, it works ;)
>
> the new version is attached.

ah, cool. the output filter test worked too.

I'd say commit all this stuff - we certainly have enough to work with now, and we can build on it as we go.

Looking forward to see your conditional GET tests and may be other interesting apps.

very nice work, stas.

;)

I still have to complete the source parsing to support fully blown perl code as an argument to FilterPreHandler().

__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxxxxxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive 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

Navigation