Michael,<br><br>Thanks for expanding that out (and revealing my poorly written documentation :).&nbsp; Still eagerly looking forward to critical review from fellow SPUSsters.<br><br>&nbsp;- Ingmar<br><br><br><div><span class="gmail_quote">
On 5/7/07, <b class="gmail_sendername">Michael R. Wolf</b> &lt;<a href="mailto:MichaelRWolf@att.net">MichaelRWolf@att.net</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I did not understand the terms "hide" and "private", so I had to unpack the<br><a href="http://Private.pm">Private.pm</a> attachment.&nbsp;&nbsp;To save others the trouble, here are a few lines...<br><br>NAME<br>&nbsp;&nbsp;&nbsp;&nbsp;Hash::Private - hashref with hidden (private) keys
<br><br>SYNOPSIS<br>&nbsp;&nbsp;&nbsp;&nbsp;Using:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use Hash::Private;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $hash = phash();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $hash-&gt;{username}&nbsp;&nbsp;= &#39;joedoe&#39;;&nbsp;&nbsp;# exposed<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $hash-&gt;{_password} = &#39;doejoe&#39;;&nbsp;&nbsp;# hidden
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;Extending:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; package MyClass;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use base &#39;Hash::Private&#39;;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sub new { shift-&gt;phash(@_) }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sub _fetch&nbsp;&nbsp;{ print &quot;FETCH called\n&quot;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sub _store&nbsp;&nbsp;{ print &quot;STORE called\n&quot;&nbsp;&nbsp;}
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sub _exists { print &quot;EXISTS called\n&quot; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sub _delete { print &quot;DELETE called&quot;\n }<br><br>DESCRIPTION<br>&nbsp;&nbsp;&nbsp;&nbsp;Hash::Private is a class which &#39;hides&#39; any key within a hash. It does
<br>&nbsp;&nbsp;&nbsp;&nbsp;this by convincing the hash iterators (each(), keys(), values()) to only<br>&nbsp;&nbsp;&nbsp;&nbsp;return values that do not start with an underscore &#39;_&#39;. By doing so, you<br>&nbsp;&nbsp;&nbsp;&nbsp;can hide keys within a hash by prefixing them with an underscore.
<br><br>[…]<br><br><br><br>--<br>Michael R. Wolf<br> All mammals learn by playing!<br> <a href="mailto:MichaelRWolf@att.net">MichaelRWolf@att.net</a><br><br><br><br>_____________________________________________________________
<br>Seattle Perl Users Group Mailing List<br>&nbsp;&nbsp;&nbsp;&nbsp; POST TO: <a href="mailto:spug-list@pm.org">spug-list@pm.org</a><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;&nbsp;MEETINGS: 3rd Tuesdays<br>&nbsp;&nbsp;&nbsp;&nbsp;WEB PAGE: <a href="http://seattleperl.org/">http://seattleperl.org/</a><br></blockquote></div><br>