in reply to Re: My first stab at OO perl...
in thread My first stab at OO perl...

You could conserve resources by generating constructors at "compile" time rather than every time the constructor (new) is called. Class::MethodMaker could do this for you:
use Class::MethodMaker get_set => [ qw( accessor1 accessor2 ) ];
Or you could update 'new' above to check to see if the accessor exists before re-building it.

Replies are listed 'Best First'.
Re: Re: Re: My first stab at OO perl...
by dragonchild (Archbishop) on Jul 16, 2002 at 18:18 UTC
    Fine. Change the = to ||= and it's ok.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.