You are on the right track. I want it to work like fatalsToBrowser which also captures compilation errors. Unfortunately, that subroutine doesn't accept arguments (you are not suppose to call it yourself), but I want the same convenience to turn it on or off with a single comment. For example:
in reply to Re^2: How can I import a function and set a parameter at the same time?
in thread How can I import a function and set a parameter at the same time?
I think the solution lies in creating my own custom import sub. I realized this right after posting. Thanks everyone for the thoughts!!
use CGI::Carp qw(fatalsToBrowser);
# use CGI::Carp qw(fatalsToBrowser);