<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>RE: SPUG: Advice on sub return-code policies?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>hmmm...any chance of convincing them to:<BR>
<BR>
1. make a distinction between<BR>
a "procedural sub", that returns a "standard return code" and<BR>
a "functional sub", that returns a value useful in an expression<BR>
<BR>
or<BR>
<BR>
2. interpret the policy to say the sub needs to throw zero-or-one of a set of standardized "exceptions"<BR>
<BR>
?<BR>
<BR>
-----Original Message-----<BR>
From: spug-list-bounces+aeh=akc.org@pm.org on behalf of Tim Maher<BR>
Sent: Wed 10/4/2006 5:42 PM<BR>
To: spug-list@pm.org<BR>
Subject: SPUG: Advice on sub return-code policies?<BR>
<BR>
The client I'm working with this week wants to develop a large<BR>
enterprise application in Perl using a special policy:<BR>
every sub needs to return a standardized "error code".<BR>
<BR>
They won't be writing /everything/ in the OO style, so encapsulating<BR>
the error codes within objects isn't an attractive choice.<BR>
<BR>
Any ideas on how they can comply with their policy without undermining<BR>
their ability to do normal things, like chain functions together (as<BR>
in reverse sort keys)?<BR>
<BR>
An "out-of-band" delivery mechanism would seem to be needed, but it<BR>
would have to be sophisticated enough to be usable with multi-<BR>
threaded apps, and no too inefficient. Are there any CPAN modules<BR>
that can help?<BR>
<BR>
What advice would you offer to a client like this?<BR>
<BR>
-Tim<BR>
*-------------------------------------------------------------------*<BR>
| Tim Maher, PhD (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX |<BR>
| tim at ( Consultix-Inc, TeachMePerl, or TeachMeUnix ) dot Com |<BR>
*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*<BR>
| UPCOMING CLASSES; 10/9: Perl Programming 11/8: Intermediate Perl |<BR>
| * Check out my new book: "Minimal Perl for UNIX/Linux People" * |<BR>
| See MinimalPerl.com for details, free chapters, and ordering |<BR>
*-------------------------------------------------------------------*<BR>
_____________________________________________________________<BR>
Seattle Perl Users Group Mailing List <BR>
POST TO: spug-list@pm.org<BR>
SUBSCRIPTION: <A HREF="http://mail.pm.org/mailman/listinfo/spug-list">http://mail.pm.org/mailman/listinfo/spug-list</A><BR>
MEETINGS: 3rd Tuesdays<BR>
WEB PAGE: <A HREF="http://seattleperl.org/">http://seattleperl.org/</A><BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>