Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Moose / Meta / Class / Immutable / Trait.pm
CommitLineData
3fea05b9 1package Moose::Meta::Class::Immutable::Trait;
2
3use strict;
4use warnings;
5
6use Class::MOP;
7
8our $VERSION = '0.93';
9$VERSION = eval $VERSION;
10our $AUTHORITY = 'cpan:STEVAN';
11
12use base 'Class::MOP::Class::Immutable::Trait';
13
14sub add_role { $_[1]->_immutable_cannot_call }
15
16sub calculate_all_roles {
17 my $orig = shift;
18 my $self = shift;
19 @{ $self->{__immutable}{calculate_all_roles} ||= [ $self->$orig ] };
20}
21
221;
23
24__END__
25
26=pod
27
28=head1 NAME
29
30Moose::Meta::Class::Immutable::Trait - Implements immutability for metaclass objects
31
32=head1 DESCRIPTION
33
34This class makes some Moose-specific metaclass methods immutable. This
35is deep guts.
36
37=head1 AUTHOR
38
39Yuval Kogman E<lt>nothingmuch@cpan.orgE<gt>
40
41=head1 COPYRIGHT AND LICENSE
42
43Copyright 2009 by Infinity Interactive, Inc.
44
45L<http://www.iinteractive.com>
46
47This library is free software; you can redistribute it and/or modify
48it under the same terms as Perl itself.
49
50=cut
51