<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Re: [DCPM] Inside-out object accessor</TITLE></HEAD>
<BODY>
<DIV id=idOWAReplyText54556 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>
<P><FONT size=2>> You're going to have to explain tht a bit more for me before I</FONT> <BR><FONT size=2>understand why it's good :)</FONT> </P></FONT></DIV></DIV>
<DIV dir=ltr>OK. The basis of inside out objects is that the attributes are held in lexical hashes, one per attribute. For example %name, %address, etc. The key to the hash is a stringified reference - any old reference so long as its unique. This reference is used as the blessed object.</DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>Normally I would create a get or set type subroutine for each attribute, get_name(), set_name(), get_address(), set_address(), etc. This can be a lot of tedious code to maintain. However this accessor covers any number of attribute hashes. It seems so simple to me that I just know there must be a drawback, though I can't see one (except that it might need a truck load of comments).</DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>Clive</DIV>
<BR>
________________________________________________________________________<BR>
This e-mail has been scanned for all viruses by Star. The<BR>
service is powered by MessageLabs. For more information on a proactive<BR>
anti-virus service working around the clock, around the globe, visit:<BR>
http://www.star.net.uk<BR>
________________________________________________________________________<BR>
</BODY></HTML>