I'm developing a house-keeping program much like logrotate, but with some extension specifically modeled to our company. Since I want this thing to have as-readable-as-possible code I'm trying to go OOP all the way. And the proper way to do errors in OOP are exceptions (for all I know). Now, I know about Error, Exception::Class, and why $@ is unreliable.
But here's the crux of the thing: none of the servers really has any modules besides the core of 5.8.8, as packaged by ActiveState; none of the servers is allowed access to the Internet at all, so there's no CPAN; and finally, all third party software installs have to be approved and packaged for all possible systems.
So my question is: is there any other way for an half-way decent exception handling besides the fugly eval { ... }; if ( $@ ) { ... } or importing Error via the "smuggling bay" by making it part of my package?
In reply to Objects and Exceptions sans CPAN by Da_Lu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |