[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Sun Aug 1 18:51:46 2004 -->
- <!--x-from-r13: syrgpu ng culqrnhk.bet (Tyrgpu) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: 1091393720.458.20.camel@devel --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] Private members in perl -->
- <li><em>date</em>: Sun Aug 1 18:51:46 2004</li>
- <li><em>from</em>: fletch at phydeaux.org (Fletch)</li>
- <li><em>in-reply-to</em>: <1091393720.458.20.camel@devel> (Chris Fowler's message of "01 Aug 2004 16:55:21 -0400")</li>
- <li><em>references</em>: <1091393720.458.20.camel@devel></li>
- <li><em>subject</em>: [ale] Private members in perl</li>
Chris> I'm trying to figure a way to implement private members in
Chris> perl objects but all the text I'm reading has me confused
The followup you posted (using a closure as your instance) is one way;
using something like Tie::SecureHash rather than a plain hashref is
another. In general Perl relies on convention rather than enforcement
in matters of encapsulation. You don't muck around with an object's
insides unless you do so according to a published interface; if you
decide to do so you do it with the knowledge that any breakage caused
by doing so is your fault.
--
Fletch | "If you find my answers frightening, __`'/|
fletch at phydeaux.org | Vincent, you should cease askin' \ o.O'
| scary questions." -- Jules =(___)=
| U
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00045" href="msg00045.html">[ale] Private members in perl</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Chris Fowler)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00037" href="msg00037.html">[ale] Private members in perl</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Chris Fowler)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00042.html">[ale] Mail Delivery (failure [email protected])</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00044.html">[ale] OT: Well it is going to hit the list sooner or later.</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00038.html">[ale] Private members in perl</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00045.html">[ale] Private members in perl</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00043"><strong>Date</strong></a></li>
<li><a href="threads.html#00043"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>