<< PrevNext >>

Diagnosing problems with scripts

Adding the line:
use CGI::Carp 'fatalsToBrowser';
After the #!/usr/bin/perl line in your script will cause most errors (apart from some script syntax errors) to be displayed on the browser rather than just causing a 500 error. This makes diagnosing script errors much easier. Any calls to die("some text") will be displayed on the browser.

You should not leave this in the script once it has been debugged.