Commit | Line | Data |
d2782813 |
1 | |
2 | package Moose::Meta::Object::Trait; |
3 | |
4 | use Scalar::Util qw(blessed); |
5 | |
d2782813 |
6 | sub _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 | |
13 | sub _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 | |
27 | 1; |
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 | |
37 | This module is entirely private, you shouldn't ever need to interact with |
38 | it directly. |
39 | |
40 | =head1 BUGS |
41 | |
42 | See L<Moose/BUGS> for details on reporting bugs. |
43 | |
d2782813 |
44 | =cut |