Use dzil Authority plugin - remove $AUTHORITY from code
[gitmo/Moose.git] / lib / Moose / Meta / Object / Trait.pm
CommitLineData
d2782813 1
2package Moose::Meta::Object::Trait;
3
4use Scalar::Util qw(blessed);
5
d2782813 6sub _get_compatible_metaclass {
7 my $orig = shift;
8 my $self = shift;
9 return $self->$orig(@_)
10 || $self->_get_compatible_metaclass_by_role_reconciliation(@_);
11}
12
13sub _get_compatible_metaclass_by_role_reconciliation {
14 my $self = shift;
15 my ($other_name) = @_;
16 my $meta_name = blessed($self) ? $self->_real_ref_name : $self;
17
18 return unless Moose::Util::_classes_differ_by_roles_only(
19 $meta_name, $other_name
20 );
21
22 return Moose::Util::_reconcile_roles_for_metaclass(
23 $meta_name, $other_name
24 );
25}
26
271;
28
ad46f524 29# ABSTRACT: Some overrides for L<Class::MOP::Object> functionality
30
d2782813 31__END__
32
33=pod
34
d2782813 35=head1 DESCRIPTION
36
37This module is entirely private, you shouldn't ever need to interact with
38it directly.
39
40=head1 BUGS
41
42See L<Moose/BUGS> for details on reporting bugs.
43
d2782813 44=cut