Perrin,

I don't quite get it.  What's the point of using a tied interface if
it's private?  The tie functionality is for tricking outside things that
expect a hash into using your object.

I want something that acts like both a hash and an array. The easiest way (AFAIK, anyway) is to make an object with overloaded hash and array dereferencing. The overloaded array deref just returns the array that the data's stored in. But the overloaded hash deref can't do that, because the data's not stored in a hash (and can't be unless I want to keep two copies of the data), and also because the hash that a DataRow acts like isn't _exactly_ like a Perl hash: for instance, it won't autovivify keys, and it won't let you delete keys. So, in this case, the tie functionality isn't being used to fool anyone into thinking it's a hash, it's more about having something that _mostly_ acts like a hash, but also has some limitations (such as the original pseudohashes, or replacements for them such as Tie::Hash::FixedKeys).



-- Buddy

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to