CGI-Log
view release on metacpan or search on metacpan
if ($param{debug} ne "secret" ## $param{debug} holds the CGI variable "debug"
|| $DEBUG != 1) ## $DEBUG is a config variable
{
Log->debug_off();
}
This can be a huge timesaver if access to the webserver is difficult.
This can be huge trouble if you have confidential or security related
information in your debugging messages. (That is why "debug" in the above
example is the string "secret" and not "1" or something easy to guess.)
=item
You can add nice status messages to your web application by doing something like:
if (Log->is_error)
{
print "<font color=\"#ff0000\">ERROR</font><BR>\n";
for (Log->get_error) { print $_ . "<BR>\n"; }
( run in 2.241 seconds using v1.01-cache-2.11-cpan-748bfb374f4 )