NAME

CGI::Env - Detect CGI, mod_perl and PerlEx.

SYNOPSIS

use CGI::Env;

print 'I am using PerlEx' if $CGI::Env::perlex;

or

use CGI::Env qw($perlex);

print 'I am using PerlEx' if $perlex;

DESCRIPTION

CGI::Env detecs CGI, mod_perl and PerlEx.

EXPORTABLE VARIABLES

$cgi       - Is script executed through CGI?
$mod_perl  - Is script executed through mod_perl?
$mod_perl1 - Is script executed through mod_perl 1.x?
$mod_perl2 - Is script executed through mod_perl 2.x?
$perlex    - Is script executed through PerlEx?

KNOWN ISSUES

$cgi is set to 1 even if script is executed through mod_perl, PerlEx or FastCGI. Use this variable to detect is script executed by web server.

AUTHOR

Tomasz Konojacki (xenu536@hotmail.com).

COPYRIGHT

Copyright (c) 2011 Tomasz Konojacki. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.