X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FClass%2FImmutable%2FTrait.pm;h=ec40256c118a0d78b9f64156eefb205852e3ec43;hb=refs%2Ftags%2F1.12;hp=97e288fe3606e4802df523db9cd5b5716ae67a62;hpb=75d2da3428d70afc00efb0f295fd0656a05d6b9f;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Class/Immutable/Trait.pm b/lib/Moose/Meta/Class/Immutable/Trait.pm index 97e288f..ec40256 100644 --- a/lib/Moose/Meta/Class/Immutable/Trait.pm +++ b/lib/Moose/Meta/Class/Immutable/Trait.pm @@ -5,16 +5,18 @@ use warnings; use Class::MOP; -our $VERSION = '0.77'; +our $VERSION = '1.12'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; use base 'Class::MOP::Class::Immutable::Trait'; -sub add_role { shift->_immutable_cannot_call } +sub add_role { $_[1]->_immutable_cannot_call } sub calculate_all_roles { - @{ $_[0]{__immutable}{calculate_all_roles} ||= [ shift->next::method ] }; + my $orig = shift; + my $self = shift; + @{ $self->{__immutable}{calculate_all_roles} ||= [ $self->$orig ] }; } 1; @@ -32,6 +34,10 @@ Moose::Meta::Class::Immutable::Trait - Implements immutability for metaclass obj This class makes some Moose-specific metaclass methods immutable. This is deep guts. +=head1 BUGS + +See L for details on reporting bugs. + =head1 AUTHOR Yuval Kogman Enothingmuch@cpan.orgE