Class::IntrospectionMethods

Class::IntrospectionMethods is a Perl module that creates methods with introspection.
Download

Class::IntrospectionMethods Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Dominique Dumont
  • Publisher web site:

Class::IntrospectionMethods Tags


Class::IntrospectionMethods Description

Class::IntrospectionMethods is a Perl module that creates methods with introspection. Class::IntrospectionMethods is a Perl module that creates methods with introspection.SYNOPSIS use Class::IntrospectionMethods qw/make_methods/; make_methods ( parent, global_catalog => { name => 'metacat', list => => f_cat, => b_cat, ], } new_with_init => 'new', get_set => ; ) ;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.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.For instance, you can use this module to create a tree where each node or leaf is an object. In this case, this module provides methods to navigate up the tree of objects with the installed "parent" method.In other words, this module provides special methods to enable the user to navigate up or down a tree (or directed graph) using introspection (to go down) and the "parent" method to go up.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.Originally, the introspection and "parent" functionalities were implemented in Class::MethodMaker. Unfortunately, they were not accepted by Class::MethodMaker's author since they did not fit his own vision of his module (fair enough).The old API of Class::MethodMaker is provided as deprecated methods. Using the new (and hopefully more consistent) API is prefered. Requirements: · Perl


Class::IntrospectionMethods Related Software