Skip to main content

mod_perl issues w. HTML::Template in AJAX calls

Having run my Perl/CGI/Apache2 app in CGI mode for a while, I upgraded a development version to mod_perl.

We did notice a remarkable increase in speed with mod_perl, but HTML::Templates got cached and were not getting refreshed with new data. I'm only trying to read manipulate some data on the session and post it in a HTML::Template based table based on an Ajax event. The output HTML is from some previous cache, which is not even consistent between different clicks.

Worse yet, I am not able to clear CGI::Session variables (using $session->clear()).

I'm almost sure there is a correct way of setting up mod_perl to work correctly w. HTML::Templates. If anyone has a good prescription, a reply-post would be appreciated.

The only line of config in my VirtualHost section for getting mod_perl to work was:
PerlResponseHandler ModPerl::Registry
Commenting this switched the app back to CGI

Comments