<HTML dir=ltr><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</HEAD>
<BODY>
<DIV><FONT face=Arial color=#000000 size=2>Anyone using inside-out objects?&nbsp; Arguments for or against&nbsp;the following generic accessor would be very welcome!&nbsp;&nbsp; Aside from the usual eval/evil argument, that is.&nbsp; It just seems too simple to be true.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>$self is the reference</FONT></DIV>
<DIV><FONT face=Arial size=2>$attr is the name of the attribute, and the name of the attribute hash</FONT></DIV>
<DIV><FONT face=Arial size=2>$value is the value to be set </FONT></DIV>
<DIV>&nbsp; 
<DIV class=O v:shape="_x0000_s1026">
<DIV><SPAN lang=EN-GB style="FONT-FAMILY: 'Lucida Console'"><B>sub set { </B></SPAN></DIV>
<DIV><SPAN lang=EN-GB style="FONT-FAMILY: 'Lucida Console'"><B><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>my ($self, $attr, $value) = @_; </B></SPAN></DIV>
<DIV><SPAN lang=EN-GB style="FONT-FAMILY: 'Lucida Console'"><B><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>my $key = refaddr $self; </B></SPAN></DIV>
<DIV><SPAN lang=EN-GB style="FONT-FAMILY: 'Lucida Console'"><B></B></SPAN></DIV>
<DIV><SPAN lang=EN-GB style="FONT-FAMILY: 'Lucida Console'"><B><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>my $hashref; </B></SPAN></DIV>
<DIV><SPAN lang=EN-GB style="FONT-FAMILY: 'Lucida Console'"><B><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>eval "\$hashref = \\\%$attr"; </B></SPAN></DIV>
<DIV><SPAN lang=EN-GB style="FONT-FAMILY: 'Lucida Console'"><B><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN></B></SPAN></DIV>
<DIV><SPAN lang=EN-GB style="FONT-FAMILY: 'Lucida Console'"><B><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>if ( !defined $hashref ) { </B></SPAN></DIV>
<DIV><SPAN lang=EN-GB style="FONT-FAMILY: 'Lucida Console'"><B><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>carp 'Invalid attribute name'; </B></SPAN></DIV>
<DIV><SPAN lang=EN-GB style="FONT-FAMILY: 'Lucida Console'"><B><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>} </B></SPAN></DIV>
<DIV><SPAN lang=EN-GB style="FONT-FAMILY: 'Lucida Console'"><B><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>else { </B></SPAN></DIV>
<DIV><SPAN lang=EN-GB style="FONT-FAMILY: 'Lucida Console'"><B><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>$hashref-&gt;{$key} = $value; </B></SPAN></DIV>
<DIV><SPAN lang=EN-GB style="FONT-FAMILY: 'Lucida Console'"><B><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>} </B></SPAN></DIV>
<DIV><SPAN lang=EN-GB style="FONT-FAMILY: 'Lucida Console'"><B>} </B></SPAN></DIV>
<DIV style="mso-line-spacing: '100 50 0'"><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV style="mso-line-spacing: '100 50 0'"><FONT face=Arial size=2>A 'get' accessor could be similar.</FONT></DIV>
<DIV style="mso-line-spacing: '100 50 0'"><FONT face=Arial size=2>Clive</FONT></DIV></DIV></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2></FONT>&nbsp;</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>