in reply to Apache2 Frustrations

Why do you insist on a handler? Unless you're going to be doing interrupting the request/response chain (special stuff), you don't need a handler.

Simply use ModPerl::Registry as your handler (basically Apache::Registry for mod_perl2) and be done with it without changing your script at all (given that it is Apache::Registry compatible, that is no __END__ section ... easy).

Replies are listed 'Best First'.
Re: Re: Apache2 Frustrations
by dragonchild (Archbishop) on Nov 21, 2003 at 20:44 UTC
    Because I will be using the request/response chain in the near future. I want to do a lot of filtering of input and output and I need my stuff to be in handlers in the first place. (At least, that's my understanding.)

    ------
    We are the carpenters and bricklayers of the Information Age.

    The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

    ... strings and arrays will suffice. As they are easily available as native data types in any sane language, ... - blokhead, speaking on evolutionary algorithms

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

      I want to do a lot of filtering of input and output and I need my stuff to be in handlers in the first place.

      I don't think that is necesary anymore. The filtering stuff is much more powerful in mod_perl2 (mainly because of the underlying changes to Apache2).

      In mod_perl1 you could only filter responses generated in mod_perl with a mod_perl filter (using Apache::Filter or one of the other chaining modules).

      In mod_perl2, you can write a filter in perl that can parse the output of any other apache module. In fact, mod_include is now also written specifically as a filter. So as an example, you could have a Java servlet whose output is filtered though mod_include, and then filtered again through a mod_perl2 filter.

      See the mod_perl2 Filter docs for more info.