in reply to Re^5: Modules for autogenerating accessor/mutator methods
in thread Modules for autogenerating accessor/mutator methods
You setup a constant or package variable or what not that has a list of what your member names are. You then write a sub AUTOLOAD { ... } which looks to see if $AUTOLOAD is in that list and if so maps it into retrieving (or setting if given argument(s)) $self->{"_$AUTOLOAD"} as appropriate (possibly generating a coderef which does the same thing and assigning that to the correct glob so AUTOLOAD is bypassed the next time).
--
We're looking for people in ATL
|
|---|