我的Perl程序如何判断是否在mod_perl下运行?
我在考虑全局变量或环境变量。
我只为mod_perl >= 2而烦恼。
发布于 2012-03-12 22:14:42
http://perl.apache.org/docs/2.0/user/coding/coding.html#Environment_Variables表示将会有一个环境变量MOD_PERL,因此您可以使用下面的表达式进行测试
exists $ENV{MOD_PERL}https://stackoverflow.com/questions/9668392
复制相似问题