2 package Moose::Meta::Object::Trait;
4 use Scalar::Util qw(blessed);
6 sub _get_compatible_metaclass {
9 return $self->$orig(@_)
10 || $self->_get_compatible_metaclass_by_role_reconciliation(@_);
13 sub _get_compatible_metaclass_by_role_reconciliation {
15 my ($other_name) = @_;
16 my $meta_name = blessed($self) ? $self->_real_ref_name : $self;
18 return unless Moose::Util::_classes_differ_by_roles_only(
19 $meta_name, $other_name
22 return Moose::Util::_reconcile_roles_for_metaclass(
23 $meta_name, $other_name
29 # ABSTRACT: Some overrides for L<Class::MOP::Object> functionality
37 This module is entirely private, you shouldn't ever need to interact with
42 See L<Moose/BUGS> for details on reporting bugs.