return 0;
}
+sub _definition_context {
+ my %context;
+ @context{qw(package file line)} = caller(1);
+
+ return (
+ definition_context => \%context,
+ );
+}
+
## ----------------------------------------------------------------------------
## Setting up our environment ...
## ----------------------------------------------------------------------------
# rather than re-produce it here
'_method_map' => \&Class::MOP::Mixin::HasMethods::_method_map
},
- default => sub { {} }
+ default => sub { {} },
+ _definition_context(),
))
);
'method_metaclass' => \&Class::MOP::Mixin::HasMethods::method_metaclass
},
default => 'Class::MOP::Method',
+ _definition_context(),
))
);
'wrapped_method_metaclass' => \&Class::MOP::Mixin::HasMethods::wrapped_method_metaclass
},
default => 'Class::MOP::Method::Wrapped',
+ _definition_context(),
))
);
# rather than re-produce it here
'_attribute_map' => \&Class::MOP::Mixin::HasAttributes::_attribute_map
},
- default => sub { {} }
+ default => sub { {} },
+ _definition_context(),
))
);
'attribute_metaclass' => \&Class::MOP::Mixin::HasAttributes::attribute_metaclass
},
default => 'Class::MOP::Attribute',
+ _definition_context(),
))
);
# rather than re-produce it here
'name' => \&Class::MOP::Package::name
},
+ _definition_context(),
))
);
'namespace' => \&Class::MOP::Package::namespace
},
init_arg => undef,
- default => sub { \undef }
+ default => sub { \undef },
+ _definition_context(),
))
);
'version' => \&Class::MOP::Module::version
},
init_arg => undef,
- default => sub { \undef }
+ default => sub { \undef },
+ _definition_context(),
))
);
'authority' => \&Class::MOP::Module::authority
},
init_arg => undef,
- default => sub { \undef }
+ default => sub { \undef },
+ _definition_context(),
))
);
'superclasses' => \&Class::MOP::Class::superclasses
},
init_arg => undef,
- default => sub { \undef }
+ default => sub { \undef },
+ _definition_context(),
))
);
'instance_metaclass' => \&Class::MOP::Class::instance_metaclass
},
default => 'Class::MOP::Instance',
+ _definition_context(),
))
);
'immutable_trait' => \&Class::MOP::Class::immutable_trait
},
default => "Class::MOP::Class::Immutable::Trait",
+ _definition_context(),
))
);
'constructor_name' => \&Class::MOP::Class::constructor_name,
},
default => "new",
+ _definition_context(),
))
);
'constructor_class' => \&Class::MOP::Class::constructor_class,
},
default => "Class::MOP::Method::Constructor",
+ _definition_context(),
))
);
reader => {
'destructor_class' => \&Class::MOP::Class::destructor_class,
},
+ _definition_context(),
))
);
# we just alias the original method
# rather than re-produce it here
'name' => \&Class::MOP::Mixin::AttributeCore::name
- }
+ },
+ _definition_context(),
))
);
Class::MOP::Attribute->new('accessor' => (
reader => { 'accessor' => \&Class::MOP::Mixin::AttributeCore::accessor },
predicate => { 'has_accessor' => \&Class::MOP::Mixin::AttributeCore::has_accessor },
+ _definition_context(),
))
);
Class::MOP::Attribute->new('reader' => (
reader => { 'reader' => \&Class::MOP::Mixin::AttributeCore::reader },
predicate => { 'has_reader' => \&Class::MOP::Mixin::AttributeCore::has_reader },
+ _definition_context(),
))
);
Class::MOP::Attribute->new('initializer' => (
reader => { 'initializer' => \&Class::MOP::Mixin::AttributeCore::initializer },
predicate => { 'has_initializer' => \&Class::MOP::Mixin::AttributeCore::has_initializer },
+ _definition_context(),
))
);
Class::MOP::Mixin::AttributeCore->meta->add_attribute(
Class::MOP::Attribute->new('definition_context' => (
reader => { 'definition_context' => \&Class::MOP::Mixin::AttributeCore::definition_context },
+ _definition_context(),
))
);
Class::MOP::Attribute->new('writer' => (
reader => { 'writer' => \&Class::MOP::Mixin::AttributeCore::writer },
predicate => { 'has_writer' => \&Class::MOP::Mixin::AttributeCore::has_writer },
+ _definition_context(),
))
);
Class::MOP::Attribute->new('predicate' => (
reader => { 'predicate' => \&Class::MOP::Mixin::AttributeCore::predicate },
predicate => { 'has_predicate' => \&Class::MOP::Mixin::AttributeCore::has_predicate },
+ _definition_context(),
))
);
Class::MOP::Attribute->new('clearer' => (
reader => { 'clearer' => \&Class::MOP::Mixin::AttributeCore::clearer },
predicate => { 'has_clearer' => \&Class::MOP::Mixin::AttributeCore::has_clearer },
+ _definition_context(),
))
);
Class::MOP::Attribute->new('builder' => (
reader => { 'builder' => \&Class::MOP::Mixin::AttributeCore::builder },
predicate => { 'has_builder' => \&Class::MOP::Mixin::AttributeCore::has_builder },
+ _definition_context(),
))
);
Class::MOP::Attribute->new('init_arg' => (
reader => { 'init_arg' => \&Class::MOP::Mixin::AttributeCore::init_arg },
predicate => { 'has_init_arg' => \&Class::MOP::Mixin::AttributeCore::has_init_arg },
+ _definition_context(),
))
);
Class::MOP::Attribute->new('default' => (
# default has a custom 'reader' method ...
predicate => { 'has_default' => \&Class::MOP::Mixin::AttributeCore::has_default },
+ _definition_context(),
))
);
reader => { 'insertion_order' => \&Class::MOP::Mixin::AttributeCore::insertion_order },
writer => { '_set_insertion_order' => \&Class::MOP::Mixin::AttributeCore::_set_insertion_order },
predicate => { 'has_insertion_order' => \&Class::MOP::Mixin::AttributeCore::has_insertion_order },
+ _definition_context(),
))
);
# we just alias the original method
# rather than re-produce it here
'associated_class' => \&Class::MOP::Attribute::associated_class
- }
+ },
+ _definition_context(),
))
);
Class::MOP::Attribute->meta->add_attribute(
Class::MOP::Attribute->new('associated_methods' => (
reader => { 'associated_methods' => \&Class::MOP::Attribute::associated_methods },
- default => sub { [] }
+ default => sub { [] },
+ _definition_context(),
))
);
Class::MOP::Method->meta->add_attribute(
Class::MOP::Attribute->new('body' => (
reader => { 'body' => \&Class::MOP::Method::body },
+ _definition_context(),
))
);
Class::MOP::Method->meta->add_attribute(
Class::MOP::Attribute->new('associated_metaclass' => (
reader => { 'associated_metaclass' => \&Class::MOP::Method::associated_metaclass },
+ _definition_context(),
))
);
Class::MOP::Method->meta->add_attribute(
Class::MOP::Attribute->new('package_name' => (
reader => { 'package_name' => \&Class::MOP::Method::package_name },
+ _definition_context(),
))
);
Class::MOP::Method->meta->add_attribute(
Class::MOP::Attribute->new('name' => (
reader => { 'name' => \&Class::MOP::Method::name },
+ _definition_context(),
))
);
Class::MOP::Attribute->new('original_method' => (
reader => { 'original_method' => \&Class::MOP::Method::original_method },
writer => { '_set_original_method' => \&Class::MOP::Method::_set_original_method },
+ _definition_context(),
))
);
# practices of attributes, but we put
# it here for completeness
Class::MOP::Method::Wrapped->meta->add_attribute(
- Class::MOP::Attribute->new('modifier_table')
+ Class::MOP::Attribute->new('modifier_table' => (
+ _definition_context(),
+ ))
);
## --------------------------------------------------------
Class::MOP::Method::Generated->meta->add_attribute(
Class::MOP::Attribute->new('is_inline' => (
reader => { 'is_inline' => \&Class::MOP::Method::Generated::is_inline },
- default => 0,
+ default => 0,
+ _definition_context(),
))
);
Class::MOP::Method::Generated->meta->add_attribute(
Class::MOP::Attribute->new('definition_context' => (
reader => { 'definition_context' => \&Class::MOP::Method::Generated::definition_context },
+ _definition_context(),
))
);
Class::MOP::Method::Inlined->meta->add_attribute(
Class::MOP::Attribute->new('_expected_method_class' => (
reader => { '_expected_method_class' => \&Class::MOP::Method::Inlined::_expected_method_class },
+ _definition_context(),
))
);
reader => {
'associated_attribute' => \&Class::MOP::Method::Accessor::associated_attribute
},
+ _definition_context(),
))
);
Class::MOP::Method::Accessor->meta->add_attribute(
Class::MOP::Attribute->new('accessor_type' => (
reader => { 'accessor_type' => \&Class::MOP::Method::Accessor::accessor_type },
+ _definition_context(),
))
);
reader => {
'options' => \&Class::MOP::Method::Constructor::options
},
- default => sub { +{} }
+ default => sub { +{} },
+ _definition_context(),
))
);
reader => {
'associated_metaclass' => \&Class::MOP::Method::Constructor::associated_metaclass
},
+ _definition_context(),
))
);
Class::MOP::Instance->meta->add_attribute(
Class::MOP::Attribute->new('associated_metaclass',
reader => { associated_metaclass => \&Class::MOP::Instance::associated_metaclass },
+ _definition_context(),
),
);
reader => { _class_name => \&Class::MOP::Instance::_class_name },
#lazy => 1, # not yet supported by Class::MOP but out our version does it anyway
#default => sub { $_[0]->associated_metaclass->name },
+ _definition_context(),
),
);
Class::MOP::Instance->meta->add_attribute(
Class::MOP::Attribute->new('attributes',
reader => { attributes => \&Class::MOP::Instance::get_all_attributes },
+ _definition_context(),
),
);
Class::MOP::Instance->meta->add_attribute(
Class::MOP::Attribute->new('slots',
reader => { slots => \&Class::MOP::Instance::slots },
+ _definition_context(),
),
);
Class::MOP::Instance->meta->add_attribute(
Class::MOP::Attribute->new('slot_hash',
reader => { slot_hash => \&Class::MOP::Instance::slot_hash },
+ _definition_context(),
),
);
__PACKAGE__->meta->add_attribute('traits' => (
reader => 'applied_traits',
predicate => 'has_applied_traits',
+ Class::MOP::_definition_context(),
));
# we need to have a ->does method in here to
__PACKAGE__->meta->add_attribute('roles' => (
reader => 'roles',
- default => sub { [] }
+ default => sub { [] },
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute('role_applications' => (
reader => '_get_role_applications',
- default => sub { [] }
+ default => sub { [] },
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute(
Class::MOP::Attribute->new('immutable_trait' => (
accessor => "immutable_trait",
default => 'Moose::Meta::Class::Immutable::Trait',
+ Class::MOP::_definition_context(),
))
);
__PACKAGE__->meta->add_attribute('constructor_class' => (
accessor => 'constructor_class',
default => 'Moose::Meta::Method::Constructor',
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute('destructor_class' => (
accessor => 'destructor_class',
default => 'Moose::Meta::Method::Destructor',
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute('error_class' => (
accessor => 'error_class',
default => 'Moose::Error::Default',
+ Class::MOP::_definition_context(),
));
sub initialize {
use base 'Class::MOP::Mixin::AttributeCore';
-__PACKAGE__->meta->add_attribute( 'isa' => ( reader => '_isa_metadata' ) );
-__PACKAGE__->meta->add_attribute( 'does' => ( reader => '_does_metadata' ) );
-__PACKAGE__->meta->add_attribute( 'is' => ( reader => '_is_metadata' ) );
+__PACKAGE__->meta->add_attribute(
+ 'isa' => (
+ reader => '_isa_metadata',
+ Class::MOP::_definition_context(),
+ )
+);
+
+__PACKAGE__->meta->add_attribute(
+ 'does' => (
+ reader => '_does_metadata',
+ Class::MOP::_definition_context(),
+ )
+);
+
+__PACKAGE__->meta->add_attribute(
+ 'is' => (
+ reader => '_is_metadata',
+ Class::MOP::_definition_context(),
+ )
+);
+
+__PACKAGE__->meta->add_attribute(
+ 'required' => (
+ reader => 'is_required',
+ Class::MOP::_definition_context(),
+ )
+);
+
+__PACKAGE__->meta->add_attribute(
+ 'lazy' => (
+ reader => 'is_lazy', Class::MOP::_definition_context(),
+ )
+);
+
+__PACKAGE__->meta->add_attribute(
+ 'lazy_build' => (
+ reader => 'is_lazy_build',
+ Class::MOP::_definition_context(),
+ )
+);
+
+__PACKAGE__->meta->add_attribute(
+ 'coerce' => (
+ reader => 'should_coerce',
+ Class::MOP::_definition_context(),
+ )
+);
-__PACKAGE__->meta->add_attribute( 'required' => ( reader => 'is_required' ) );
-__PACKAGE__->meta->add_attribute( 'lazy' => ( reader => 'is_lazy' ) );
__PACKAGE__->meta->add_attribute(
- 'lazy_build' => ( reader => 'is_lazy_build' ) );
-__PACKAGE__->meta->add_attribute( 'coerce' => ( reader => 'should_coerce' ) );
-__PACKAGE__->meta->add_attribute( 'weak_ref' => ( reader => 'is_weak_ref' ) );
+ 'weak_ref' => (
+ reader => 'is_weak_ref',
+ Class::MOP::_definition_context(),
+ )
+);
+
__PACKAGE__->meta->add_attribute(
- 'auto_deref' => ( reader => 'should_auto_deref' ) );
+ 'auto_deref' => (
+ reader => 'should_auto_deref',
+ Class::MOP::_definition_context(),
+ )
+);
+
__PACKAGE__->meta->add_attribute(
'type_constraint' => (
reader => 'type_constraint',
predicate => 'has_type_constraint',
+ Class::MOP::_definition_context(),
)
);
+
__PACKAGE__->meta->add_attribute(
'trigger' => (
reader => 'trigger',
predicate => 'has_trigger',
+ Class::MOP::_definition_context(),
)
);
+
__PACKAGE__->meta->add_attribute(
'handles' => (
reader => 'handles',
writer => '_set_handles',
predicate => 'has_handles',
+ Class::MOP::_definition_context(),
)
);
+
__PACKAGE__->meta->add_attribute(
'documentation' => (
reader => 'documentation',
predicate => 'has_documentation',
+ Class::MOP::_definition_context(),
)
);
# 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 {
__PACKAGE__->meta->add_attribute('method_exclusions' => (
init_arg => '-excludes',
reader => 'get_method_exclusions',
- default => sub { [] }
+ default => sub { [] },
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute('method_aliases' => (
init_arg => '-alias',
reader => 'get_method_aliases',
- default => sub { {} }
+ default => sub { {} },
+ Class::MOP::_definition_context(),
));
sub new {
__PACKAGE__->meta->add_attribute('role_params' => (
reader => 'role_params',
- default => sub { {} }
+ default => sub { {} },
+ Class::MOP::_definition_context(),
));
sub get_exclusions_for_role {
__PACKAGE__->meta->add_attribute('role' => (
reader => 'role',
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute('class' => (
accessor => 'class',
+ Class::MOP::_definition_context(),
));
sub apply {
__PACKAGE__->meta->add_attribute('rebless_params' => (
reader => 'rebless_params',
- default => sub { {} }
+ default => sub { {} },
+ Class::MOP::_definition_context(),
));
sub apply {
__PACKAGE__->meta->add_attribute(
'metaclass' => (
reader => 'metaclass',
+ Class::MOP::_definition_context(),
)
);
__PACKAGE__->meta->add_attribute(
'associated_role' => (
reader => 'associated_role',
+ Class::MOP::_definition_context(),
)
);
__PACKAGE__->meta->add_attribute(
'_original_role' => (
reader => '_original_role',
+ Class::MOP::_definition_context(),
)
);
__PACKAGE__->meta->add_attribute(
'is' => (
reader => 'is',
+ Class::MOP::_definition_context(),
)
);
__PACKAGE__->meta->add_attribute(
'original_options' => (
reader => 'original_options',
+ Class::MOP::_definition_context(),
)
);
# since we don't have an actual
# package for this.
# - SL
-__PACKAGE__->meta->add_attribute('name' => (reader => 'name'));
+__PACKAGE__->meta->add_attribute('name' => (
+ reader => 'name',
+ Class::MOP::_definition_context(),
+));
# NOTE:
# Again, since we don't have a real
# - SL
__PACKAGE__->meta->add_attribute('_methods' => (
reader => '_method_map',
- default => sub { {} }
+ default => sub { {} },
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute(
'application_role_summation_class',
reader => 'application_role_summation_class',
default => 'Moose::Meta::Role::Application::RoleSummation',
+ Class::MOP::_definition_context(),
);
sub new {
__PACKAGE__->meta->add_attribute('roles' => (
reader => 'roles',
required => 1,
+ Class::MOP::_definition_context(),
));
sub roles_as_english_list {
__PACKAGE__->meta->add_attribute('name' => (
reader => 'name',
required => 1,
+ Class::MOP::_definition_context(),
));
sub new { shift->_new(@_) }
__PACKAGE__->meta->add_attribute('type_coercion_map' => (
reader => 'type_coercion_map',
- default => sub { [] }
+ default => sub { [] },
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute(
Moose::Meta::Attribute->new('type_constraint' => (
reader => 'type_constraint',
- weak_ref => 1
+ weak_ref => 1,
+ Class::MOP::_definition_context(),
))
);
# private accessor
__PACKAGE__->meta->add_attribute('compiled_type_coercion' => (
- accessor => '_compiled_type_coercion'
+ accessor => '_compiled_type_coercion',
+ Class::MOP::_definition_context(),
));
sub new {
use base qw(Class::MOP::Object);
-__PACKAGE__->meta->add_attribute('name' => (reader => 'name'));
+__PACKAGE__->meta->add_attribute('name' => (
+ reader => 'name',
+ Class::MOP::_definition_context(),
+));
__PACKAGE__->meta->add_attribute('parent' => (
reader => 'parent',
predicate => 'has_parent',
+ Class::MOP::_definition_context(),
));
my $null_constraint = sub { 1 };
__PACKAGE__->meta->add_attribute('constraint' => (
reader => 'constraint',
writer => '_set_constraint',
- default => sub { $null_constraint }
+ default => sub { $null_constraint },
+ Class::MOP::_definition_context(),
));
+
__PACKAGE__->meta->add_attribute('message' => (
accessor => 'message',
- predicate => 'has_message'
+ predicate => 'has_message',
+ Class::MOP::_definition_context(),
));
+
__PACKAGE__->meta->add_attribute('_default_message' => (
accessor => '_default_message',
+ Class::MOP::_definition_context(),
));
+
# can't make this a default because it has to close over the type name, and
# cmop attributes don't have lazy
my $_default_message_generator = sub {
};
__PACKAGE__->meta->add_attribute('coercion' => (
accessor => 'coercion',
- predicate => 'has_coercion'
+ predicate => 'has_coercion',
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute('hand_optimized_type_constraint' => (
init_arg => 'optimized',
accessor => 'hand_optimized_type_constraint',
predicate => 'has_hand_optimized_type_constraint',
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute('inlined' => (
init_arg => 'inlined',
accessor => 'inlined',
predicate => '_has_inlined_type_constraint',
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute('inline_environment' => (
init_arg => 'inline_environment',
accessor => '_inline_environment',
default => sub { {} },
+ Class::MOP::_definition_context(),
));
sub parents {
__PACKAGE__->meta->add_attribute('compiled_type_constraint' => (
accessor => '_compiled_type_constraint',
- predicate => '_has_compiled_type_constraint'
+ predicate => '_has_compiled_type_constraint',
+ Class::MOP::_definition_context(),
));
+
__PACKAGE__->meta->add_attribute('package_defined_in' => (
- accessor => '_package_defined_in'
+ accessor => '_package_defined_in',
+ Class::MOP::_definition_context(),
));
sub new {
__PACKAGE__->meta->add_attribute('class' => (
reader => 'class',
+ Class::MOP::_definition_context(),
));
my $inliner = sub {
__PACKAGE__->meta->add_attribute('methods' => (
accessor => 'methods',
+ Class::MOP::_definition_context(),
));
my $inliner = sub {
__PACKAGE__->meta->add_attribute('values' => (
accessor => 'values',
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute('_inline_var_name' => (
accessor => '_inline_var_name',
+ Class::MOP::_definition_context(),
));
my $inliner = sub {
__PACKAGE__->meta->add_attribute('constraint_generator' => (
accessor => 'constraint_generator',
predicate => 'has_constraint_generator',
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute('inline_generator' => (
accessor => 'inline_generator',
predicate => 'has_inline_generator',
+ Class::MOP::_definition_context(),
));
sub generate_constraint_for {
__PACKAGE__->meta->add_attribute('type_parameter' => (
accessor => 'type_parameter',
predicate => 'has_type_parameter',
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute('parameterized_from' => (
accessor => 'parameterized_from',
predicate => 'has_parameterized_from',
+ Class::MOP::_definition_context(),
));
sub equals {
reader => 'get_parent_registry',
writer => 'set_parent_registry',
predicate => 'has_parent_registry',
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute('type_constraints' => (
reader => 'type_constraints',
- default => sub { {} }
+ default => sub { {} },
+ Class::MOP::_definition_context(),
));
sub new {
__PACKAGE__->meta->add_attribute('role' => (
reader => 'role',
+ Class::MOP::_definition_context(),
));
my $inliner = sub {
__PACKAGE__->meta->add_attribute('type_constraints' => (
accessor => 'type_constraints',
- default => sub { [] }
+ default => sub { [] },
+ Class::MOP::_definition_context(),
));
sub new {