From: gfx Date: Wed, 18 Nov 2009 06:53:32 +0000 (+0900) Subject: Fix _reconcile_with_superclass_meta X-Git-Tag: 0.40_08~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=29422d0044fd1ee33ccb2e947e39d4f04001a2a2;p=gitmo%2FMouse.git Fix _reconcile_with_superclass_meta --- diff --git a/lib/Mouse/Meta/Class.pm b/lib/Mouse/Meta/Class.pm index 8871128..dda6284 100644 --- a/lib/Mouse/Meta/Class.pm +++ b/lib/Mouse/Meta/Class.pm @@ -63,8 +63,6 @@ sub superclasses { next if $self->isa(ref $meta); # _superclass_meta_is_compatible - # XXX: should we check 'is_pristine' ? - $self->_reconcile_with_superclass_meta($meta); } @{ $self->{superclasses} } = @_; @@ -84,18 +82,17 @@ sub _reconcile_with_superclass_meta { my($self, $super_meta) = @_; my @incompatibles; + foreach my $metaclass_type(@MetaClassTypes){ my $super_c = $super_meta->$metaclass_type(); my $self_c = $self->$metaclass_type(); if(!$super_c->isa($self_c)){ - push @incompatibles, $metaclass_type => $super_c; + push @incompatibles, ($metaclass_type => $super_c); } } - if(@incompatibles){ - $super_meta->reinitialize($self->name, @incompatibles); - } + $super_meta->reinitialize($self, @incompatibles); return; }