> Uhm. So when would I ever use this over a simple hash?

Well I used it because the application I'm working on has a data model with
a lot of variation (I did this instead of creating a massive class
hierarchy). The accessors are the hash key scalar string. The 'equals' and
'contains' methods are delegated to the value objects when keys are "eq."
(yes a wrapper object is required for the value but this could be
automated.)    This allows fairly complex searches of a container of
objects.

This is based on an idea from a Java tutorial. I think it works better in
Perl than Java because the value objects can be of arbitrary type allowing
the composite hash based object to be more complex if needed.

Reply via email to