in reply to Disabling CGI::Carp(fatalsToBrowser)
If I am not mistaken, your issue is that you are dying in the module, and this information does not tell you where in your program the problem is. The right solution to this is to change the module to use Carp's croak or confess function rather than dying. The croak function will try to figure out where in your script the fatal call came from. The confess function will give a complete stack backtrace, which will include both the line in the module and the line in the script.
If you don't want to change the module, a quick hack to make dies confess instead looks like this:
(The output may look very awkward if the die came from a carp or confess.)use CGI::Carp; use Carp; BEGIN { $CGI::Carp::WRAP++; $SIG{__DIE__} = \&CGI::Carp::confess; }
Random note. While fatalsToBrowser is great for development, you should disable it before going to production. Else it makes any security hole much worse by providing useful information for attackers to use to "debug" their attacks on bugs in your software.
|
|---|