Guan Yuxin
Guan Yuxin

Reputation: 430

Redirecting CGI(perl) error output to client

I use perl as cgi for apache server,when each time the script encounters an error,the client just show 500 error and I have to check the apache error log every time.

Is there a way to let perl send it's error message just to the client (just like asp's debug mode)?

Upvotes: 4

Views: 422

Answers (1)

Ilion
Ilion

Reputation: 6872

You need to use the CGI::Carp module:

use CGI::Carp qw(warningsToBrowser fatalsToBrowser);

Upvotes: 8

Related Questions