2 package Moose::Meta::Object::Trait;
4 use Scalar::Util qw(blessed);
6 our $AUTHORITY = 'cpan:STEVAN';
8 sub _get_compatible_metaclass {
11 return $self->$orig(@_)
12 || $self->_get_compatible_metaclass_by_role_reconciliation(@_);
15 sub _get_compatible_metaclass_by_role_reconciliation {
17 my ($other_name) = @_;
18 my $meta_name = blessed($self) ? $self->_real_ref_name : $self;
20 return unless Moose::Util::_classes_differ_by_roles_only(
21 $meta_name, $other_name
24 return Moose::Util::_reconcile_roles_for_metaclass(
25 $meta_name, $other_name
31 # ABSTRACT: Some overrides for L<Class::MOP::Object> functionality
39 This module is entirely private, you shouldn't ever need to interact with
44 See L<Moose/BUGS> for details on reporting bugs.