perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Wheeler <>
Subject Re: [MP2] mod_perl 1.0 -> mod_perl 2.0 conversion woes.
Date Tue, 09 Aug 2005 16:53:34 GMT
Yup.  As it turns out, it was my own stupidity.  It was calling handler
again, but handler was returning DECLINED due to a mismatched
content_type, and mod_perl had simply remembered the next handler was
dbconnect and went about its day.

Problem was fixed by having handler() clear out any other
PerlResponseHandlers before starting over again.


Justin Wheeler wrote:
> I realise there's a good chance my issue is my own stupidity, but I'm
> hoping someone else can help out -- I've searched this mailing list and
> google, all to no avail.
> I am in the midst of trying to convert my software from mod_perl 1 to
> mod_perl 2 without the use of Apache2::Compat.
> I have imported (I think) all of the necessary modules, and changed the
> constants to read Apache2::Const::OK|DECLINED|etc.
> I have made the necessary conversions in the code, etc.
> My Apache config simply reads:
> PerlResponseHandler deBiz::Main
> So when I fetch a URL, it calls deBiz::Main::handler just fine.
> My code works by doing what it must do, and then doing a push_handlers
> to move onto the next function, that way, any given part of the module
> can return something other than DECLINED and it will quit at that point.
> It all worked just fine in mod_perl 1.0
> The functions it calls in order are:
> handler -> dbconnect -> session_check -> prepare_data -> sendpage
> And it works by calling:
> Apache2::ServerUtil->server->push_handlers('PerlResponseHandler' =>
> \&functionname);
> So, the program runs on index.html, and works just fine.. it calls each
> function perfectly in order as it's supposed to.
> Then, when anything referenced by the page (ie an image, or favicon.ico)
> is requested in the same HTTP session by the browser, mod_perl tries to
> parse it by starting over at &dbconnect() instead of going back to the
> original &handler().
> Even if I set a variable and look for its value in dbconnect and reset
> handler and return DECLINED, it just ends and refuses to run &handler().
> As I said before, it works just fine in mod_perl 1.0, and only broke as
> of mod_perl 2.0.
> Thoughts/ideas?
> Justin

View raw message