How can my Perl program tell if is running under mod_perl?
I’m thinking along the lines of global variables or environment variables.
I am only bothered about mod_perl >= 2.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
http://perl.apache.org/docs/2.0/user/coding/coding.html#Environment_Variables says that there will be an environment variable
MOD_PERL, so you could test for that using the expression