in reply to Re: How to conditionally use CGI::Carp?
in thread How to conditionally use CGI::Carp?
BEGIN { if ( ... ) { require 'CGI::Carp'; CGI::Carp->import('fatalsToBrowser'); } }
But my perl doesn't like the single quotes. And, since I want to import more than one function, I used "import" directly, resulting in:
require CGI::Carp; import CGI::Carp qw(fatalsToBrowser set_message carpout); set_message(\&handle_error);
Next, you said:
I typically test for the existance of $ENV{'SERVER'} or any of the other environmental variables
Problem is, $ENV is completely empty when I run either from the tty or as a cgi. This surprises me, too, frankly. I test for anything, and always get zilch.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to conditionally use CGI::Carp?
by argv (Pilgrim) on May 06, 2005 at 05:05 UTC |