Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Dominique Dumont
December 6, 2004, 7:12 pm
rate this thread
I've uploaded to CPAN a brand new perl package which provides
Class::IntrospectionMethods. A module to create methods with
In other words, this module provides:
- A way to set up a lot of get/set method. These get/set methods can
access plain scalars, array, hash. These scalar, hash or array can
be tied (See perltie) with classes specified by the user. The
element of these arrays or hashes can be constrained to be object,
- A way to later query the object or class to retrieve the list of
methods (aka slots) created by this module.
- A way to organize these slots in several catalogs.
- A way to backtrack from contained object to container object: When a
slot contains object or tied scalars hashes or arrays, the contained
object can be queried for the container object. In other words, the
parent object (the one constructed by Class::IntrospectionMethods
contains a child object in one of its slots either as a plain object
or an object hidden behind a tied
construct. Class::IntrospectionMethods will provide the child object
a method to retrieve the parent object reference.
You may notice similarities between this module and
Class::MethodMaker. In fact this module was written from
Class::MethodMaker v1.08, but it does not provide most of the fancy
methods of Class::MethodMaker. Only scalar, array and hash accessors
(with their tied and objects variants) are provided.
For more details, see:
To Martyn J. Pearce for Class::MethodMaker and the enlightening
discussion we had a while ago about parent and catalog.
To Matthew Simon Cavalletto for the parameter translation idea that I
pilfered from Class::MakeMethods.
"Delivering successful solutions requires giving people what they
need, not what they want." Kurt Bittner