[ANNOUNCE] New module Class::IntrospectionMethods

From: Dominique Dumont (domi_at_komarr.grenoble.hp.com)
Date: 12/06/04


Date: Mon, 6 Dec 2004 13:12:52 GMT


Hello

I've uploaded to CPAN a brand new perl package which provides
Class::IntrospectionMethods. A module to create methods with
introspection feature.

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,
  tied scalar.

- 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:
http://search.cpan.org/~ddumont/Class-IntrospectionMethods-1.001/IntrospectionMethods.pm

THANKS
------

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.

-- 
Dominique Dumont 
"Delivering successful solutions requires giving people what they
need, not what they want." Kurt Bittner


Relevant Pages

  • Re: using fortran intrinsic functions in mex-file
    ... LOGICAL FUNCTION LSAME ... These programs must be called using F90 style array ... Scalar Arguments .. ... Purpose ...
    (comp.soft-sys.matlab)
  • Re: Another Perl datatype headache ( scalars $, hashes %, and arrays @ )
    ... > If I want to add Hash keys to another Hash, ... > Usually, I use scalar @array; ... $#array is not the length of the array. ... If you are sure your sub is called: ...
    (perl.beginners)
  • Re: operator overloading ... for numerical classes only
    ... The restriction to "scalar" types is meant to include complex numbers, ... and array code would be more similar? ... An ordered sequence type would ... sequence of data should be a List or an array. ...
    (comp.lang.java.programmer)
  • Re: Question about minloc
    ... why is it necessary to specify dim=1 ... Because the MINLOCintrinsic returns a 1-D array of minimum indices, ... returns the scalar minimum index for the specified dimension. ... if the DIM argument *weren't* present, ...
    (comp.lang.fortran)