in reply to More then one AUTOLOAD in a class hierarchy.
And now the method cascading that you asked for comes for free from Perl's OO dispatch. There is no AUTOLOAD issue to figure out how to resolve because there is no AUTOLOAD to confuse the issue.use strict; package Parent; sub make_accessors { my ($class, @attributes) = @_; foreach my $attribute (@attributes) { no strict 'refs'; *{"$class\::$attribute"} = sub { my $self = shift; if (@_) { $self->{$attribute} = shift; } return $self->{$attribute}; }; } } package Child; our @ISA = 'Parent'; __PACKAGE__->make_accessors(qw(this that the other));
|
|---|