<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">


<META content="MSHTML 6.00.2800.1264" name=GENERATOR>
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><SPAN class=218010112-08122003><FONT face=Arial color=#0000ff 
size=2>Philip:&nbsp; Are you asking how to better solve this problem through 
OOP, or are you asking for ways to improve your use of this object-oriented 
module that someone else wrote?&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=218010112-08122003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=218010112-08122003><FONT face=Arial color=#0000ff size=2>If 
you're asking&nbsp;how to solve your problems through OOP, I would recommend 
creating a wrapper object that takes the&nbsp;value names you dislike and maps 
them to names you DO like.&nbsp; This will encapsulate the offending code and 
shield the rest of your project from it.&nbsp; There is currently no OOP code in 
the sample you provided (other than your use of the 3rd party's object) so I'm 
not sure what your comfort level is with Perl OOP.&nbsp; If you do want more 
help on this, I can certainly provide it, but it will be a little more in-depth, 
so I'll let&nbsp;you indicate that you need this before I get off on a long 
tangent here.</FONT></SPAN></DIV>
<DIV><SPAN class=218010112-08122003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=218010112-08122003><FONT face=Arial color=#0000ff size=2>If you 
simply want to improve your own use of the object in question by improving the 
code you provided, I would recommend that you look into the keys() and values() 
functions, which will help you avoid having to enter your list of "lousy_names" 
2 times.&nbsp; Try something like this:</FONT></SPAN></DIV>
<DIV><SPAN class=218010112-08122003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=218010112-08122003><FONT face="Courier New" 
size=2>%RecordParams = (</FONT>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT 
face="Courier New"><SPAN class=218010112-08122003>&nbsp;&nbsp;&nbsp; 
"</SPAN>lousy_name_1<SPAN class=218010112-08122003>"</SPAN> =&gt;&nbsp;<SPAN 
class=218010112-08122003>"</SPAN>Meaningful name 1<SPAN 
class=218010112-08122003>"</SPAN>,</FONT></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT 
face="Courier New"><SPAN class=218010112-08122003>&nbsp;&nbsp;&nbsp; 
"</SPAN>lousy_name_2<SPAN class=218010112-08122003>"</SPAN> =&gt;&nbsp;<SPAN 
class=218010112-08122003>"</SPAN>Meaningful name 2<SPAN 
class=218010112-08122003>"</SPAN>,</FONT></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT 
face="Courier New"><SPAN class=218010112-08122003>&nbsp;&nbsp;&nbsp; 
"</SPAN>lousy_name_3<SPAN class=218010112-08122003>" </SPAN>=&gt;&nbsp;<SPAN 
class=218010112-08122003>"</SPAN>Meaningful name 3<SPAN 
class=218010112-08122003>"</SPAN>,</FONT></SPAN></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">);</SPAN></FONT></P>
<P class=MsoNormal><FONT size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT face="Courier New"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN class=218010112-08122003># 
Perl requires lowercase "sub", not "Sub"!</SPAN></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT face="Courier New"><SPAN 
class=218010112-08122003>s</SPAN>ub printRecordDetails {</FONT></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT 
face="Courier New"><SPAN class=218010112-08122003>&nbsp;&nbsp;&nbsp; </SPAN>my 
$record = shift;</FONT></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN 
class=218010112-08122003><FONT face="Courier New">&nbsp;&nbsp;&nbsp; # keys() 
will return the array ( "lousy_name_1", "lousy_name_2", "lousy_name_3" ) based 
on what</FONT></SPAN></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN 
class=218010112-08122003><FONT face="Courier New">&nbsp;&nbsp;&nbsp; #&nbsp; you 
have assigned as keys for the %RecordParams hash.&nbsp; values() would 
return</FONT></SPAN></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN 
class=218010112-08122003><FONT face="Courier New">&nbsp;&nbsp;&nbsp; 
#&nbsp;&nbsp;the array&nbsp;("Meaningful Name 1", etc... 
)</FONT></SPAN></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT 
face="Courier New"><SPAN class=218010112-08122003>&nbsp;&nbsp;&nbsp; 
</SPAN>foreach my $line (&nbsp;<SPAN 
class=218010112-08122003>keys(%RecordParams) </SPAN>) {</FONT></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT 
face="Courier New"><SPAN 
class=218010112-08122003>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>print 
$RecordParams{$line} .&nbsp;<SPAN class=218010112-08122003>"</SPAN> 
=&nbsp;&nbsp;<SPAN class=218010112-08122003>"</SPAN> . $record-&gt;param($line) 
.&nbsp;<SPAN class=218010112-08122003>"</SPAN>\n<SPAN 
class=218010112-08122003>"</SPAN>;</FONT></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT 
face="Courier New"><SPAN class=218010112-08122003>&nbsp;&nbsp;&nbsp; 
</SPAN>}</FONT></SPAN></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">}</SPAN></FONT></P></SPAN></FONT>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT color=#0000ff><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN 
class=218010112-08122003>Another thing you might try is ditching the subroutine 
and using:</SPAN></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial><FONT size=2><SPAN 
class=218010112-08122003></SPAN></FONT></FONT><FONT><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN 
class=218010112-08122003></SPAN></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN 
class=218010112-08122003><FONT face="Courier New">for my $record&nbsp; ( <SPAN 
class=218010112-08122003>keys(%RecordParams) </SPAN>) {</FONT></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT 
face="Courier New"><SPAN class=218010112-08122003>&nbsp;&nbsp;&nbsp; 
</SPAN>foreach my $line ( @RecordOrder) {</FONT></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT 
face="Courier New"><SPAN 
class=218010112-08122003>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>print 
$RecordParams{$line} .&nbsp;<SPAN class=218010112-08122003>"</SPAN> 
=&nbsp;&nbsp;<SPAN class=218010112-08122003>"</SPAN> . $record-&gt;param($line) 
.&nbsp;<SPAN class=218010112-08122003>"</SPAN>\n<SPAN 
class=218010112-08122003>"</SPAN>;</FONT></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT 
face="Courier New"><SPAN class=218010112-08122003>&nbsp;&nbsp;&nbsp; 
</SPAN>}</FONT></SPAN></P></SPAN></SPAN></SPAN></FONT>
<P class=MsoNormal><FONT face="Courier New"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN 
class=218010112-08122003>}</SPAN></SPAN></FONT></P>
<P class=MsoNormal><FONT><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN 
class=218010112-08122003></SPAN></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT color=#0000ff><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN 
class=218010112-08122003>That's much more readable and succinct.&nbsp; It 
actually cuts your script down to around 12 lines (not counting comments and 
white space).</SPAN></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P></SPAN></DIV>
<DIV><SPAN class=218010112-08122003></SPAN><FONT face=Arial color=#0000ff 
size=2><SPAN class=218010112-08122003>As far as I can tell, there's no 
multidimensional array being used by&nbsp;your 3rd party object.&nbsp; In fact, 
Perl doesn't support them.&nbsp; It only supports arrays of arrays, which can be 
used to solve similar problems, anyhow, and can often appear to be 
multi-dimensional.&nbsp; Fortunately, it doesn't look like you'll have to deal 
with that kind of complexity here.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=218010112-08122003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=218010112-08122003>What 
you get by accessing $object-&gt;{"Record"} is a single dimensional&nbsp;array 
of objects.&nbsp; Each of these objects seems to have a "param" method that 
allows you get&nbsp;the value of a&nbsp;single field of the record.&nbsp; I 
agree this could have been much better designed.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=218010112-08122003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=218010112-08122003>I 
would&nbsp;prefer to see&nbsp;something like this:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=218010112-08122003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Courier size=2><SPAN class=218010112-08122003>while ( my $record 
= $object-&gt;getNext() ) {</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=218010112-08122003><FONT 
face=Courier>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach my $line ( 
@RecordOrder ) {</FONT>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT 
face=Courier><SPAN 
class=218010112-08122003>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>print $RecordParams{$line} . " = &nbsp;" . $record-&gt;param($line) . 
"\n";</FONT></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT 
face=Courier><SPAN 
class=218010112-08122003>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>}</FONT></SPAN></P></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=218010112-08122003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=218010112-08122003>This 
creates a getNext() method that returns the appropriate record object when 
called and moves an internal pointer to the next record in the object's array 
list.&nbsp; Another option would have been:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=218010112-08122003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=218010112-08122003>
<DIV><SPAN class=218010112-08122003><FONT face=Courier>while 
($object-&gt;moveNext() ) {</FONT></SPAN></DIV>
<DIV><FONT size=2><SPAN class=218010112-08122003><FONT 
face=Courier>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach my $line ( 
@RecordOrder ) { </FONT>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT 
face=Courier><SPAN 
class=218010112-08122003>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>print $RecordParams{$line} . " = &nbsp;" . $<SPAN 
class=218010112-08122003>object</SPAN>-&gt;param($line) . 
"\n";</FONT></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT 
face=Courier><SPAN 
class=218010112-08122003>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>}</FONT></SPAN></P></SPAN></FONT></DIV></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=218010112-08122003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=218010112-08122003>This 
form removes the need for the "$record" object to be provided.&nbsp; You just 
use the "$object" object and that's all.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=218010112-08122003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=218010112-08122003>Requiring consumers of your OOP code to use the 
$object-&gt;{"Record"} form of accessing your object's data is catastrophically 
bad form unless&nbsp;you're both the author of the OOP code and the only 
consumer of it.&nbsp; This is somewhat equivalent to using&nbsp;public variables 
in object-oriented Java, C++, or VB code and expecting your consumers to use 
them.&nbsp; It's&nbsp;a recipe for disaster.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=218010112-08122003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=218010112-08122003>jpt</SPAN></FONT></DIV>
<DIV><FONT face=Tahoma><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><BR><FONT size=2><SPAN class=218010112-08122003><FONT face=Arial 
color=#0000ff>&nbsp;</FONT></SPAN>-----Original Message-----<BR><B>From:</B> 
Phillip Tyre [mailto:phillip.tyre@fcul.com]<BR><B>Sent:</B> Friday, December 05, 
2003 10:55 AM<BR><B>To:</B> tallahassee-pm@mail.pm.org<BR><B>Subject:</B> 
[Tallahassee-pm] Perl, a better way to do this with 
OOP<BR><BR></DIV></FONT></FONT>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=Section1>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">It's not that I'm not a huge fan 
  of the object oriented parts of Perl, I'm just not that versed in it. That 
  said, I find my self working on a for fun project that uses a lot of OOP. I'm 
  trying to get up to speed, and I have something that almost works, but it's 
  not elegant. It's also not very readable!</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I started with a program someone 
  else had written to walk through the object and print out the 
  information.</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Abstracting it a bit, it looks 
  like this:</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  I have a library that someone else wrote that unpacks a binary file into an 
  object.</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # I get an object containing the file contents with:</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  my $object = Module:Method-&gt;new_object_from_file(file);</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # The names used by the object are not the best in the world, so we have a 
  line like this:</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  %RecordParams = (</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;"lousy_name_1" =&gt; "Meaningful name 1",</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  "lousy_name_2" =&gt; "Meaningful name 2",</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  "lousy_name_3" =&gt; "Meaningful name 3",</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  );</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # Then we create a new array with:</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  @RecordOrder = qw ( lousy_name_1 lousy_name_2 lousy_name_3 
);</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  </SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  T# hen we have a subroutine to print out the info for a 
  record:</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  Sub printRecordDetails {</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  my $record = shift;</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  foreach my $line ( @RecordOrder) {</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  print $RecordParams{$line} . " = &nbsp;" . $record-&gt;param($line) . 
  "\n";</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  }</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  }</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # Use a method of the object to return a (multidimensional?) array of all the 
  records.</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  my @records = @{$object-&gt;{"Record"}};</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # Then we call the subroutine in a loop for each record</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  for my $record&nbsp; ( @records ) {</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  printRecordDetails( $record );</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # end</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">And that's it, now keep in mind 
  this is an example script provided by someone else to make use of the library. 
  It just doesn't seem like the best way to do things, but I suppose I don't 
  know enough about OOP to know what questions to ask to find answers to make it 
  better.</SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  </SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>