http://www.perlmonks.org?node_id=94603


in reply to Object and tied hash all at once?

Do you have access to (i.e. are you writing) Class::Whatever ?

If so, define Class::Whatever as a subclass of Tie::StdHash,

package Class:whatever; @ISA = (Tie::StdHash)
you can use the hash capabilities plus whatever else you add to the new class, including e.g. methods.

Tie::StdHash is part of Tie::Hash
--
Brovnik