in reply to how to convert my existing cgi page to mod_perl.

The oddly named Apache::Registry is designed to allow Perl code written in CGI-style to be executed by mod_perl. Couple that with Apache::DBI to provide persistent database connections and you should see a significant speedup for very little effort.

One 'gotcha' with the Apache::Registry approach is that you should not use 'my' for variables which are global to your script. If you can't avoid globals, use 'our' instead. Within subroutines, use 'my' as usual. Make sure you have your script running cleanly under use strict and use warnings before you try under Apache::Registry.

  • Comment on Re: how to convert my existing cgi page to mod_perl.