A discussion in another question got me wondering: what do other programming languages\' exception systems have that Perl\'s lacks?
Perl\'s built-in exceptions are a
Don't use Exceptions for regular errors. Only Fatal problems that will stop the current execution should die. All other should be handled without die
.
Example: Parameter validation of called sub: Don't die at the first problem. Check all other parameters and then decide to stop by returning something or warn and correct the faulty parameters and proceed. That do in test or development mode. But possibly die
in production mode. Let the application decide this.
JPR (my CPAN login)
Greetings from Sögel, Germany