From: Dave Rolsky Date: Fri, 3 Jul 2009 02:21:46 +0000 (-0500) Subject: changes to accomodate new style of immutable traits in CMOP head X-Git-Tag: 0.86~1^2~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d92054109880706d20394d605e3fdac4cd5367d5;p=gitmo%2FMoose.git changes to accomodate new style of immutable traits in CMOP head --- diff --git a/lib/Moose/Meta/Class/Immutable/Trait.pm b/lib/Moose/Meta/Class/Immutable/Trait.pm index 7099aa4..02b151c 100644 --- a/lib/Moose/Meta/Class/Immutable/Trait.pm +++ b/lib/Moose/Meta/Class/Immutable/Trait.pm @@ -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;