Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable error message in Perl like PHP

Is there somehow I can "turn on" error message/error handling in Perl, putting out error message like Apache do by default with PHP? Explaining which line the error is at.

Greetings

like image 484
Fredrik Avatar asked Jan 26 '26 22:01

Fredrik


1 Answers

Maybe you're after CGI::Carp. This module lets you redirect errors and/or warnings to the browser window.

From the doco:

use CGI::Carp qw(fatalsToBrowser);
die "Fatal error messages are now sent to browser";
like image 110
dwarring Avatar answered Jan 29 '26 12:01

dwarring



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!