in reply to
mod_perl with Apache::Registry with CGI.pm design considerations
I have been researching mod_perl and how to migrate my older perl scripts to it. What I have found are a couple of things:
- Always use strict; and turn on warnings -- This will show you if a var will fall out of scope
- Always pass any variables to a sub -- This will make sure none of them become global.
- Creating a .pm file with your functions will allow Apache to handle them better.
- Instead of use CGI; do a require CGI; -- This is supposed to destroy any "Global" variables created or use by CGI
- Turn off KeepAlive -- (Unless you need it like me :(
- Apache::DBI is great!
Learn patience, you must.
Young PerlMonk, craves Not these things.
Use the source Luke.