http://qs321.pair.com?node_id=11125501


in reply to Re: Dynamically generate setter/getter methods [Updated]
in thread Dynamically generate setter/getter methods

The AUTOLOAD approach has some caveats to be aware of:

1. It will be marginally slower because each call to the accessor will search the inheritance tree before calling AUTOLOAD

2. Querying the object with can will return a false result, which is probably not what users of the object would expect.

  • Comment on Re^2: Dynamically generate setter/getter methods [Updated]

Replies are listed 'Best First'.
Re^3: Dynamically generate setter/getter methods [Updated]
by stevieb (Canon) on Dec 20, 2020 at 19:28 UTC

    Thanks Arunbear. I thought about this a bit more, and I almost feel I dabbled with AUTOLOAD quite some years ago, but found deficiencies that prevented me from using it. That said, I very well could be off my rocker and thinking about something else. I will give it a try though and see how it goes.