I think you can use set_die_handler with some global variable in the code to enable/disable Carp messages.
In reply to Re: CGI Error Reporting by Gangabass in thread CGI Error Reporting by agronbach