简体   繁体   English

如何为Catalyst fastcgi进程指定Perl包含路径?

[英]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 我已经使用local :: lib在〜/ perl5 / lib / perl5中安装了Catalyst的所有依赖项

I want to run my app under Apache2 using mod_fcgid, but the fastcgi perl script cannot find the modules in my custom path. 我想使用mod_fcgid在Apache2下运行我的应用程序,但是fastcgi perl脚本无法在我的自定义路径中找到模块。 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? 如何指定(apache配置?)我的自定义lib目录包含在INC目录中,而无需明确地将其侵入myapp_fastcgi.pl? I want to be able to move my app between servers that have the perl includes installed in different directories. 我希望能够在安装了Perl包括在不同目录中的服务器之间移动我的应用程序。

Thanks, Rob 谢谢,罗布

You can set the environment variables with DefaultInitEnv . 您可以使用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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM