0
votes

I recently developed a catalyst application which I would now like to deploy. My host (OVH) allows perl applications via mod_cgi. Unfortunately, I'm used to running my catalyst apps on mod_perl. I have no experience with mod_cgi whatsoever, and I can't seem to find good documentation on how I should get my catalyst app running on mod_cgi.

Any chance that some of you guys could give me a hand? Has anyone of you ever run a catalyst app on OVH's services?

Thanks, ldx

2
just mod_cgi, not mod_fastcgi? - ysth
There's nothing difficult about it, but be prepared for page hits that take a couple seconds for very simple apps, up to perhaps 10 seconds for complex apps. Catalyst is not intended to be run non-persistently. - hobbs
if so, you'd best be looking for a different host. though google shows a number of questions about mod_fastcgi installation/configuration on OVH forums - are you sure? - ysth

2 Answers

3
votes

catalyst.pl creates a CGI program.

Foo-Bar> cd ..
> catalyst.pl -scripts Foo::Bar
> ls Foo-Bar/scripts/

For Catalyst 5.8, the code of Foo-Bar/scripts/foo_bar_cgi.pl excluding POD looks like:

#!/usr/bin/env perl
use Catalyst::ScriptRunner;
Catalyst::ScriptRunner->run('Foo::Bar', 'CGI');

1;
2
votes

Catalyst::Engine::CGI is the base module you have to look at. If your Catalyst code is backend-agnostic you should be able to just drop that in your base app, create a CGI file through which your whole application runs, and it will all work.

The CGI environment though is going to be very much slower than fastcgi or even mod_perl.