SPUG: Hashes with Private/Hidden Values

Ingmar Ellenberger ingmar at site42.com
Mon May 7 07:18:38 PDT 2007


Hi all,

A couple of months ago I had a need for a hash where I could 'hide' keys
from the foreach loop, but to my surprise, there seemed to be nothing of the
sort on CPAN.  In my usual re-invent-the-wheel style I wrote a class and
named it 'Hash::Private' and am considering submitting it to CPAN.  My
questions are ...

1. Is there already something like this and I just didn't find it?
2. Is 'Hash::Private' an appropriate name, considering it's a hashref and
the term 'private' is way too overloaded?

I did find a class that had the ability to hide keys, but the package it was
a part of also included dozens of other features that I didn't need (or
want).  Unfortunately, I don't recall the name of that class.

I've attached the class for reference and critical review.

Thanks in advance - Ingmar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/spug-list/attachments/20070507/e13da584/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Private.pm
Type: text/x-perl
Size: 12510 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/spug-list/attachments/20070507/e13da584/attachment-0003.bin 


More information about the spug-list mailing list