http://www.perlmonks.org?node_id=225154


in reply to Re: Two tips for developing with HTML::Template
in thread Two tips for developing with HTML::Template

Wouldn't it be simpler to use CGI::Carp qw(fatalsToBrowser) at the beginning of your script, or perhaps set up a $SIG{__DIE__} handler?

Both of those are reasonable approaches, though I found that using eval gave me a bit more control. With an eval, you can make a case-by-case decision to continue or really die. Some HTML::Template errors, particularly complaints about parameters, are safe to continue past when you're debugging.