I have some perl modules which are intergreted in a cgi script which runs on a web server. How can I simply convert these modules to a mod_perl handler?
Thanks.
I have some perl modules which are intergreted in a cgi script which runs on a web server. How can I simply convert these modules to a mod_perl handler?
Thanks.
If all you want is for mod_perl to make your code cached/faster, then...
Just add the following to your Apache host configuration:
Alias /cgi-bin/ /path/to/your/cgi/script/folder
PerlRequire /path/to/startup-script.pl
<Files ~ (\.cgi)>
Options +ExecCGI
SetHandler perl-script
PerlHandler ModPerl::Registry
PerlSendHeader On
</Files>
In startup-script.pl
set up your include path (if needed) with use lib
.
Then you can just use CGI::Simple
as before.