bump version to 0.97
[gitmo/Moose.git] / lib / Moose / Meta / Class / Immutable / Trait.pm
index 8d13a7c..05aa1f4 100644 (file)
@@ -5,16 +5,18 @@ use warnings;
 
 use Class::MOP;
 
-our $VERSION   = '0.80';
+our $VERSION   = '0.97';
 $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<Moose/BUGS> for details on reporting bugs.
+
 =head1 AUTHOR
 
 Yuval Kogman E<lt>nothingmuch@cpan.orgE<gt>