Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Try-Lite CPAN distribution.

Report information
The Basics
Id: 83341
Status: stalled
Priority: 0/
Queue: Try-Lite

People
Owner: Nobody in particular
Requestors: perl [...] toby.ink
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Constants for exception handling
It would be nice if Try::Lite some constants like this: use constant { IGNORE => sub { return; }, WARNING => sub { warn($@); }, RETHROW => sub { die($@); }, }; This would allow the following sugary code to work: try { some('code'); } NetworkException => IGNORE, FileException => WARNING, PermissionsException => RETHROW, ;
Do you want to EXPORT of that constants from Try::Lite? I must think whether it is necessary.