http://qs321.pair.com?node_id=375449


in reply to Re^3: Why is a hash the default "object" in oo perl?
in thread Why is a hash the default "object" in oo perl?

I have stepped on a key before, but it was easy to find with Data::Dumper.

Now I am in the habit of writing a little test program using the module. The test program uses Data::Dumper so that I can look at the object before writing something that will inherit from it.

This approach has been satisfactory unless the objects are overly large, complex, or numerous. There are several dimensions to this scalability problem:

  1. Length: The object is really long, such as Data::Dumper output that is more than 10,000 lines long.
  2. Depth: The data structure has too many levels, so that indentation is hard to follow. I typically start to lose insight somewhere between 5 and 10 levels of depth.
  3. Complexity: Since the hash values come out in a non-intuitive order, small things can get lost next to big things.
However, if I'm doing something this big and complex I usually have the time to do some research to figure it out.

My approach is not perfect. This may be why I don't use an IS_A relationship when a HAS_A relationship will probably work just as well in my immediate application.

It should work perfectly the first time! - toma