2 package Moose::Meta::Object::Trait;
4 use Scalar::Util qw(blessed);
6 our $VERSION = '1.9900';
7 $VERSION = eval $VERSION;
8 our $AUTHORITY = 'cpan:STEVAN';
10 sub _get_compatible_metaclass {
13 return $self->$orig(@_)
14 || $self->_get_compatible_metaclass_by_role_reconciliation(@_);
17 sub _get_compatible_metaclass_by_role_reconciliation {
19 my ($other_name) = @_;
20 my $meta_name = blessed($self) ? $self->_real_ref_name : $self;
22 return unless Moose::Util::_classes_differ_by_roles_only(
23 $meta_name, $other_name
26 return Moose::Util::_reconcile_roles_for_metaclass(
27 $meta_name, $other_name
39 Moose::Meta::Object::Trait - Some overrides for L<Class::MOP::Object> functionality
43 This module is entirely private, you shouldn't ever need to interact with
48 See L<Moose/BUGS> for details on reporting bugs.
52 Jesse Luehrs E<lt>doy at tozt dot netE<gt>
54 =head1 COPYRIGHT AND LICENSE
56 Copyright 2010 by Infinity Interactive, Inc.
58 L<http://www.iinteractive.com>
60 This library is free software; you can redistribute it and/or modify
61 it under the same terms as Perl itself.