in reply to Autoload versus auto-generating accessors

I almost never use AUTOLOAD for performance reasons and to avoid the issue of it going to the wrong parent (if using inheritance). No, I've never had it go to the wrong parent, I'm just concerned about that. :)

If the number of "getters" is 5 (or so) or less, I just hand code them. If it's a larger number, then I do something like the AM does above with:
BEGIN { for my $opt ( qw< a b c d e f g > ) { no strict 'refs'; my $sub = "get_$opt"; *$sub = sub { $self=shift; return $self->{$opt}; }; } }
I might have to have a hash or something that maps english names to internal names to help that out, but still, that's the basics of it and I've been pleased with it.

I always hand code "setters" because there are normally so few of them, but I could do the above method for them too if I had to.

HTH,
Kevin