CGI (perl) error output redirection to the client

I use perl as cgi for the apache server, every time the script detects an error, the client just shows a 500 error, and I have to check the apache error log every time.

Is there a way to allow perl to send an error message only to the client (same as asp debugging mode)?

+4
source share
1 answer

You need to use the CGI :: Carp module:

use CGI::Carp qw(warningsToBrowser fatalsToBrowser); 
+8
source

Source: https://habr.com/ru/post/1395343/


All Articles