SPUG: Hashes with Private/Hidden Values

Joshua ben Jore twists at gmail.com
Wed May 9 08:45:45 PDT 2007

On 5/8/07, Ingmar Ellenberger <ingmar at site42.com> wrote:
> On 5/7/07, Joshua ben Jore <twists at gmail.com> wrote:
> > On 5/7/07, Ingmar Ellenberger <ingmar at site42.com> wrote:
> > > 2. Is 'Hash::Private' an appropriate name, considering it's a hashref
> and
> > > the term 'private' is way too overloaded?
> >
> > Does Tie::Hash::HiddenKeys make more sense to you? I don't immediately
> > associate "undetectable" with your word "private."
> >
> > josh
> >
> Thanks Josh,
> I like the 'HiddenKeys' suggestion.  Do you (or anyone) have any better
> ideas for the Tie::Hash part?  Although this class uses a tied hash, it's
> really meant to be used as an object ( i.e. a hashref) and putting it under
> Tie::Hash would be somewhat misleading.

See... I would think *not* being under Tie:: is misleading since that
is its entire trick. Hashes are not objects and having a funky
behaving hash doesn't mean I should have to work with it via a

Why should I have to say $hash_ref->{_private} when I can just as
easily desire to say $hash{_private}? With the latter, the interface
could be construed to be more clearly be a Tie:: module.


More information about the spug-list mailing list