my $current_single_meta_name = $self->_get_associated_single_metaclass($single_meta_name);
+ # XXX: gross
+ return unless $self->_classes_differ_by_roles_only(
+ $single_meta_name,
+ $current_single_meta_name,
+ $single_meta_name->isa('Class::MOP::Attribute')
+ ? 'Moose::Meta::Attribute'
+ : 'Moose::Meta::Method'
+ );
+
return Moose::Util::_reconcile_roles_for_metaclass($single_meta_name, $current_single_meta_name);
}
My::Class->meta()->add_after_method_modifier( 'bar' => sub { 'bar' } );
is( My::Class->meta()->get_method('bar')->foo(), 10,
'... call foo() on a wrapped method metaclass object' );
+ # so that it doesn't break on reinitialization, since it's a
+ # Class::MOP::Method::Wrapped object, which isn't a Moose::Meta::Method
+ # object. Someday we'll fix this...
+ My::Class->meta()->remove_method('bar');
}
{
My::Class->meta()->add_after_method_modifier( 'bar' => sub { 'bar' } );
is( My::Class->meta()->get_method('bar')->foo(), 10,
'... call foo() on a wrapped method metaclass object' );
+ # so that it doesn't break on reinitialization, since it's a
+ # Class::MOP::Method::Wrapped object, which isn't a Moose::Meta::Method
+ # object. Someday we'll fix this...
+ My::Class->meta()->remove_method('bar');
}
{