Hello everybody, I am developing a module to make throwing Exception::Class objects easier. The goal is to make the code to throw an exception shorter and to make it possible to keep all error messages at some central place.
The module works quite similarly to Class::Accessor and provides a function mk_exception_functions that puts the required functions into a given namespace. For example you can define an exception like __PACKAGE__->mk_exception_functions (messages => {foo => 'Error foo occurred.'}, exception_class => 'Exception::Class::Mine'); and later just call foo() if($foo); instead of Exception::Class::Mine->throw(message => 'Error foo occurred.') if($foo); Currently the module uses the package Exception::Class::EasyThrow but I don't know if this is really a good name. It is a bit vague and rather refers to the intended use of the module instead of what it does. I would be happy about other suggestions. Thanks a lot, Lutz