From: Dave Rolsky Date: Mon, 4 Jan 2010 20:16:44 +0000 (-0600) Subject: Run new code through tidy X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7ae09debd63b91febc33c3395de34fb3635efdf9;p=gitmo%2FClass-MOP.git Run new code through tidy --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index 347653d..f8f51de 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -466,26 +466,29 @@ sub rebless_instance { } sub rebless_instance_back { - my ($self, $instance) = @_; + my ( $self, $instance ) = @_; my $old_metaclass = Class::MOP::class_of($instance); - my $old_class = $old_metaclass ? $old_metaclass->name : blessed($instance); - $old_class->isa($self->name) - || confess "You may rebless only into a superclass of ($old_class), of which (". $self->name .") isn't."; + my $old_class + = $old_metaclass ? $old_metaclass->name : blessed($instance); + $old_class->isa( $self->name ) + || confess + "You may rebless only into a superclass of ($old_class), of which (" + . $self->name + . ") isn't."; - $old_metaclass->rebless_instance_away($instance, $self) + $old_metaclass->rebless_instance_away( $instance, $self ) if $old_metaclass; my $meta_instance = $self->get_meta_instance; # we use $_[1] here because of t/306_rebless_overload.t regressions on 5.8.8 - $meta_instance->rebless_instance_structure($_[1], $self); + $meta_instance->rebless_instance_structure( $_[1], $self ); - for my $attr ($old_metaclass->get_all_attributes) { - next if $self->has_attribute($attr->name); - $meta_instance->deinitialize_slot($instance, $_) - for $attr->slots; + for my $attr ( $old_metaclass->get_all_attributes ) { + next if $self->has_attribute( $attr->name ); + $meta_instance->deinitialize_slot( $instance, $_ ) for $attr->slots; } return $instance;