# create the attribute
$META->add_attribute($action->{name} => (
reader => $attr_reader,
- default => sub { {} }
+ default => sub { {} },
+ Class::MOP::_definition_context(),
));
# create some helper methods
'method_metaclass',
reader => 'method_metaclass',
default => 'Moose::Meta::Role::Method',
+ Class::MOP::_definition_context(),
);
$META->add_attribute(
'required_method_metaclass',
reader => 'required_method_metaclass',
default => 'Moose::Meta::Role::Method::Required',
+ Class::MOP::_definition_context(),
);
$META->add_attribute(
'conflicting_method_metaclass',
reader => 'conflicting_method_metaclass',
default => 'Moose::Meta::Role::Method::Conflicting',
+ Class::MOP::_definition_context(),
);
$META->add_attribute(
'application_to_class_class',
reader => 'application_to_class_class',
default => 'Moose::Meta::Role::Application::ToClass',
+ Class::MOP::_definition_context(),
);
$META->add_attribute(
'application_to_role_class',
reader => 'application_to_role_class',
default => 'Moose::Meta::Role::Application::ToRole',
+ Class::MOP::_definition_context(),
);
$META->add_attribute(
'application_to_instance_class',
reader => 'application_to_instance_class',
default => 'Moose::Meta::Role::Application::ToInstance',
+ Class::MOP::_definition_context(),
);
$META->add_attribute(
'applied_attribute_metaclass',
reader => 'applied_attribute_metaclass',
default => 'Moose::Meta::Attribute',
+ Class::MOP::_definition_context(),
);
# More or less copied from Moose::Meta::Class
# create the attribute ...
$META->add_attribute("${modifier_type}_method_modifiers" => (
reader => $attr_reader,
- default => sub { {} }
+ default => sub { {} },
+ Class::MOP::_definition_context(),
));
# and some helper methods ...
$META->add_attribute('override_method_modifiers' => (
reader => 'get_override_method_modifiers_map',
- default => sub { {} }
+ default => sub { {} },
+ Class::MOP::_definition_context(),
));
# NOTE:
$META->add_attribute('roles' => (
reader => 'get_roles',
- default => sub { [] }
+ default => sub { [] },
+ Class::MOP::_definition_context(),
));
sub add_role {