Michael,<br><br>Thanks for expanding that out (and revealing my poorly written documentation :). Still eagerly looking forward to critical review from fellow SPUSsters.<br><br> - Ingmar<br><br><br><div><span class="gmail_quote">
On 5/7/07, <b class="gmail_sendername">Michael R. Wolf</b> <<a href="mailto:MichaelRWolf@att.net">MichaelRWolf@att.net</a>> 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. To save others the trouble, here are a few lines...<br><br>NAME<br> Hash::Private - hashref with hidden (private) keys
<br><br>SYNOPSIS<br> Using:<br><br> use Hash::Private;<br><br> my $hash = phash();<br> $hash->{username} = 'joedoe'; # exposed<br> $hash->{_password} = 'doejoe'; # hidden
<br><br> Extending:<br><br> package MyClass;<br> use base 'Hash::Private';<br><br> sub new { shift->phash(@_) }<br><br> sub _fetch { print "FETCH called\n" }<br> sub _store { print "STORE called\n" }
<br> sub _exists { print "EXISTS called\n" }<br> sub _delete { print "DELETE called"\n }<br><br>DESCRIPTION<br> Hash::Private is a class which 'hides' any key within a hash. It does
<br> this by convincing the hash iterators (each(), keys(), values()) to only<br> return values that do not start with an underscore '_'. By doing so, you<br> 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> 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> MEETINGS: 3rd Tuesdays<br> WEB PAGE: <a href="http://seattleperl.org/">http://seattleperl.org/</a><br></blockquote></div><br>