From: Dave Rolsky Date: Tue, 22 Sep 2009 21:33:20 +0000 (-0500) Subject: Tidy and make weaken_value private X-Git-Tag: 0.92~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=32881f68f011f90ef4fc128ad616e000afabad09;p=gitmo%2FMoose.git Tidy and make weaken_value private --- diff --git a/lib/Moose/Meta/Attribute.pm b/lib/Moose/Meta/Attribute.pm index 640f20a..0e3fd5e 100644 --- a/lib/Moose/Meta/Attribute.pm +++ b/lib/Moose/Meta/Attribute.pm @@ -428,7 +428,7 @@ sub initialize_instance_slot { $self->set_initial_value($instance, $val); if ( ref $val && $self->is_weak_ref ) { - $self->weaken_value($instance); + $self->_weaken_value($instance); } } @@ -503,7 +503,7 @@ sub set_value { $self->SUPER::set_value($instance, $value); if ( ref $value && $self->is_weak_ref ) { - $self->weaken_value($instance); + $self->_weaken_value($instance); } if ($self->has_trigger) { @@ -511,11 +511,11 @@ sub set_value { } } -sub weaken_value { +sub _weaken_value { my ( $self, $instance ) = @_; - my $meta_instance = - Class::MOP::Class->initialize( blessed($instance) )->get_meta_instance; + my $meta_instance = Class::MOP::Class->initialize( blessed($instance) ) + ->get_meta_instance; $meta_instance->weaken_slot_value( $instance, $self->name ); }