<!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>
&nbsp;&nbsp; a &quot;procedural sub&quot;, that returns a &quot;standard return code&quot; and<BR>
&nbsp;&nbsp; a &quot;functional sub&quot;, that returns a value useful in an expression<BR>
<BR>
&nbsp; or<BR>
<BR>
2. interpret the policy to say the sub needs to throw zero-or-one of a set of standardized &quot;exceptions&quot;<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>
&nbsp;every sub needs to return a standardized &quot;error code&quot;.<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 &quot;out-of-band&quot; 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>
|&nbsp; Tim Maher, PhD&nbsp; (206) 781-UNIX&nbsp;&nbsp; (866) DOC-PERL&nbsp; (866) DOC-UNIX&nbsp; |<BR>
|&nbsp; tim at ( Consultix-Inc, TeachMePerl, or TeachMeUnix ) dot Com&nbsp;&nbsp;&nbsp; |<BR>
*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*<BR>
| UPCOMING CLASSES; 10/9: Perl Programming&nbsp; 11/8: Intermediate Perl |<BR>
|&nbsp; * Check out my new book: &quot;Minimal Perl for UNIX/Linux People&quot; *&nbsp; |<BR>
|&nbsp;&nbsp;&nbsp; See MinimalPerl.com for details, free chapters, and ordering&nbsp;&nbsp; |<BR>
*-------------------------------------------------------------------*<BR>
_____________________________________________________________<BR>
Seattle Perl Users Group Mailing List&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp; 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>
&nbsp;&nbsp;&nbsp; MEETINGS: 3rd Tuesdays<BR>
&nbsp;&nbsp;&nbsp; WEB PAGE: <A HREF="http://seattleperl.org/">http://seattleperl.org/</A><BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>