Name : perl-Throwable-SugarFactory
| |
Version : 0.213360
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 1.25
| Date : 2024-08-05 20:34:33
|
Group : Unspecified
| Source RPM : perl-Throwable-SugarFactory-0.213360-1.25.src.rpm
|
Size : 0.06 MB
| |
Packager : (none)
| |
Summary : Build a Library of Syntax-Sugared Throwable-Based Exceptions
|
Description :
This is an effort to create an exception library that is useful and pleases my aesthetics. The explicit goals were:
1. Declare exception classes at runtime to remove the need for multiple files.
2. Retain the use of the perl builtin \'die\' to throw the exception, to minimize the difference from common standard Perl code and thus increase reading speed.
3. Gain ability to construct the exception class with a short function call, to increase reading speed by removing the need to: Use the full class name; mention the constructor name at all; use cumbersome method call syntax and forced parens.
4. Gain ability to perform ISA checks with a short function call, also to increase reading speed by removing the need to use the full class name.
To build an exception library with this module, simply \'use\' the module in your package, which sets it up as a library to export the constructor and class name shortcuts you will be declaring with the exported keyword \'exception\'.
To use the exceptions in your code, \'use\' your exception library in the module where you wish to throw exceptions, whereupon it will export the shortcuts. You can then create the exception with the snake_cased constructor function and call die to throw it, and when its caught, can call ->isa with the CamelCased shortcut that returns the class name.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-T/openSUSE_Tumbleweed/noarch |