bump version to 1.19
[gitmo/Moose.git] / lib / Moose / Meta / Object / Trait.pm
1
2 package Moose::Meta::Object::Trait;
3
4 use Scalar::Util qw(blessed);
5
6 our $VERSION   = '1.19';
7 $VERSION = eval $VERSION;
8 our $AUTHORITY = 'cpan:STEVAN';
9
10 sub _get_compatible_metaclass {
11     my $orig = shift;
12     my $self = shift;
13     return $self->$orig(@_)
14         || $self->_get_compatible_metaclass_by_role_reconciliation(@_);
15 }
16
17 sub _get_compatible_metaclass_by_role_reconciliation {
18     my $self = shift;
19     my ($other_name) = @_;
20     my $meta_name = blessed($self) ? $self->_real_ref_name : $self;
21
22     return unless Moose::Util::_classes_differ_by_roles_only(
23         $meta_name, $other_name
24     );
25
26     return Moose::Util::_reconcile_roles_for_metaclass(
27         $meta_name, $other_name
28     );
29 }
30
31 1;
32
33 __END__
34
35 =pod
36
37 =head1 NAME
38
39 Moose::Meta::Object::Trait - Some overrides for L<Class::MOP::Object> functionality
40
41 =head1 DESCRIPTION
42
43 This module is entirely private, you shouldn't ever need to interact with
44 it directly.
45
46 =head1 BUGS
47
48 See L<Moose/BUGS> for details on reporting bugs.
49
50 =head1 AUTHOR
51
52 Jesse Luehrs E<lt>doy at tozt dot netE<gt>
53
54 =head1 COPYRIGHT AND LICENSE
55
56 Copyright 2010 by Infinity Interactive, Inc.
57
58 L<http://www.iinteractive.com>
59
60 This library is free software; you can redistribute it and/or modify
61 it under the same terms as Perl itself.
62
63 =cut