changes to accomodate new style of immutable traits in CMOP head
Dave Rolsky [Fri, 3 Jul 2009 02:21:46 +0000 (21:21 -0500)]
lib/Moose/Meta/Class/Immutable/Trait.pm

index 7099aa4..02b151c 100644 (file)
@@ -11,10 +11,12 @@ 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;