my $class_name = $associated_class->name;
my $name = "${class_name}::${handle}";
- ( !$associated_class->has_method($handle) )
- || $self->throw_error(
- "You cannot overwrite a locally defined method ($handle) with a delegation",
- method_name => $handle );
+ if ( my $method = $associated_class->get_method($handle) ) {
+ $self->throw_error(
+ "You cannot overwrite a locally defined method ($handle) with a delegation",
+ method_name => $handle
+ ) unless $method->is_stub;
+ }
# NOTE:
# handles is not allowed to delegate