SPUG: Advice on sub return-code policies?

Tim Maher tim at consultix-inc.com
Wed Oct 4 14:42:24 PDT 2006


The client I'm working with this week wants to develop a large
enterprise application in Perl using a special policy: every sub needs
to return a standardized "error code".

They won't be writing /everything/ in the OO style, so encapsulating
the error codes within objects isn't an attractive choice.

Any ideas on how they can comply with their policy without undermining
their ability to do normal things, like chain functions together (as
in reverse sort keys)?

An "out-of-band" delivery mechanism would seem to be needed, but it
would have to be sophisticated enough to be usable with multi-
threaded apps, and no too inefficient. Are there any CPAN modules
that can help?

What advice would you offer to a client like this?

-Tim
*-------------------------------------------------------------------*
|  Tim Maher, PhD  (206) 781-UNIX   (866) DOC-PERL  (866) DOC-UNIX  |
|  tim at ( Consultix-Inc, TeachMePerl, or TeachMeUnix ) dot Com    |
*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*
| UPCOMING CLASSES; 10/9: Perl Programming  11/8: Intermediate Perl |
|  * Check out my new book: "Minimal Perl for UNIX/Linux People" *  |
|    See MinimalPerl.com for details, free chapters, and ordering   |
*-------------------------------------------------------------------*


More information about the spug-list mailing list