);
}
-sub _find_delegate_metaclass {
- my $self = shift;
- if (my $class = $self->_isa_metadata) {
- # we might be dealing with a non-Moose class,
- # and need to make our own metaclass. if there's
- # already a metaclass, it will be returned
- return Class::MOP::Class->initialize($class);
- }
- elsif (my $role = $self->_does_metadata) {
- return Class::MOP::class_of($role);
- }
- else {
- $self->throw_error("Cannot find delegate metaclass for attribute " . $self->name);
- }
-}
-
sub _get_delegate_method_list {
my $self = shift;
my $meta = $self->_find_delegate_metaclass;
}
}
+sub _find_delegate_metaclass {
+ my $self = shift;
+ if (my $class = $self->_isa_metadata) {
+ # we might be dealing with a non-Moose class,
+ # and need to make our own metaclass. if there's
+ # already a metaclass, it will be returned
+ return Class::MOP::Class->initialize($class);
+ }
+ elsif (my $role = $self->_does_metadata) {
+ return Class::MOP::class_of($role);
+ }
+ else {
+ $self->throw_error("Cannot find delegate metaclass for attribute " . $self->name);
+ }
+}
+
sub delegation_metaclass { 'Moose::Meta::Method::Delegation' }
sub _make_delegation_method {