Rob Boerman
Rob Boerman

Reputation: 2168

How do I specify the Perl include path for a Catalyst fastcgi process?

i have installed all my dependencies for Catalyst in ~/perl5/lib/perl5 using local::lib

I want to run my app under Apache2 using mod_fcgid, but the fastcgi perl script cannot find the modules in my custom path. How can I specify that (apache config?) my custom lib dir is to be included in the INC directory without explicitly hacking it into myapp_fastcgi.pl? I want to be able to move my app between servers that have the perl includes installed in different directories.

Thanks, Rob

Upvotes: 1

Views: 1158

Answers (1)

Colin Newell
Colin Newell

Reputation: 3163

You can set the environment variables with DefaultInitEnv. You probably want something like this, but with your regular includes too,

DefaultInitEnv PERL5LIB /home/rob/perl5/lib/perl5

You can also do things like setting your app config like that too,

DefaultInitEnv APPNAME_CONFIG /srv/app/appname.conf

Upvotes: 3

Related Questions