in reply to Re: Access custom classes 'self' array
in thread Access custom classes 'self' array

Yes, I have read all of those. This is just a basic example to show the idea of what im trying to do. My real world situation is a bit different. I have a set of classes that are inherited from a base 'Object' class. I can write one function in the 'Object' class that takes care of all the inherited classes, or write the function 20 times in each of the inherited classes... Do you see what I am saying?
  • Comment on Re^2: Access custom classes 'self' array

Replies are listed 'Best First'.
Re^3: Access custom classes 'self' array
by CountZero (Bishop) on Sep 11, 2007 at 14:21 UTC
    OK, in that case you really should have a look at Moose. Although it is a bit "heavy", it has a very clear structure and allows for all forms of inheritance with well constructed build and destroy mechanisms. You don't even have to write your own new routine as it is already provided for you!

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James