I using Apache 2.2 and mod_perl 2.0.4. I want to retrieve the value of an environment variable named "A_VARIABLE" in a mod_perl handler which was set in an Apache configuration file as:
SetEnv A_VARIABLE "some value"
In the mod_perl documentation about the PerlSetEnv configuration option, it says the following:
PerlSetupEnv On will allow you to access the environment variables like $ENV{REQUEST_URI}, which are available under CGI. However, when programming handlers, there are always better ways to access these variables through the Apache API. Therefore, it is recommended to turn it Off except for scripts which absolutely require it. See PerlSetupEnv Off.
Is there a way to access to read that variable without using the %ENV hash as the documentation implies? If so, please provide a short example on how to do so.