开发者

Catalyst + mod_cgi

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 han开发者_如何转开发d? Has anyone of you ever run a catalyst app on OVH's services?

Thanks, ldx


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;


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜