1 package Moose::Meta::Class::Immutable::Trait;
9 $VERSION = eval $VERSION;
10 our $AUTHORITY = 'cpan:STEVAN';
12 use base 'Class::MOP::Class::Immutable::Trait';
14 sub add_role { $_[1]->_immutable_cannot_call }
16 sub calculate_all_roles {
19 @{ $self->{__immutable}{calculate_all_roles} ||= [ $self->$orig ] };
22 sub calculate_all_roles_with_inheritance {
25 @{ $self->{__immutable}{calculate_all_roles_with_inheritance} ||= [ $self->$orig ] };
36 Moose::Meta::Class::Immutable::Trait - Implements immutability for metaclass objects
40 This class makes some Moose-specific metaclass methods immutable. This
45 See L<Moose/BUGS> for details on reporting bugs.
49 Yuval Kogman E<lt>nothingmuch@cpan.orgE<gt>
51 =head1 COPYRIGHT AND LICENSE
53 Copyright 2009 by Infinity Interactive, Inc.
55 L<http://www.iinteractive.com>
57 This library is free software; you can redistribute it and/or modify
58 it under the same terms as Perl itself.