# under the terms of the GPL version 2, or any later version. See the
# file README and COPYING for more information. Copyright 2003 by Don
# Armstrong <don@donarmstrong.com>.
# under the terms of the GPL version 2, or any later version. See the
# file README and COPYING for more information. Copyright 2003 by Don
# Armstrong <don@donarmstrong.com>.
- $self->_addmethods($subclass::_methods($self,$options));
- $subclass::_init($self);
+ $self->_addmethods($subclass,&{"${subclass}::_methods"}($self,$options));
+ &{"${subclass}::_init"}($self);
# stick the method into the table
# DLA: Make with the munchies!
foreach my $method (@methods) {
# stick the method into the table
# DLA: Make with the munchies!
foreach my $method (@methods) {
- my ($method_name) = $method =~ /\:*([^\:]+)$/;
- if ($self->{_methodhash}->{$method_name}->{overridden}) {
- carp "Not overriding already overriden method $method_name\n" if $DEBUG;
- next;
+ if (not $method =~ /^$subclass/) {
+ $method = $subclass.$method;
carp "Overriding $method_name $self->{_methodhash}->{$method_name}->{reference} with $method\n";
}
$self->{_methodhash}->{$method_name}->{reference} = $method;
carp "Overriding $method_name $self->{_methodhash}->{$method_name}->{reference} with $method\n";
}
$self->{_methodhash}->{$method_name}->{reference} = $method;