From: Yuval Kogman Date: Sat, 2 Aug 2008 12:45:43 +0000 (+0000) Subject: inline initialize slot didn't match non inline X-Git-Tag: 0_64~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a007159dcf8bc57e8ca504cd49e0b6034962b6b8;p=gitmo%2FClass-MOP.git inline initialize slot didn't match non inline --- diff --git a/lib/Class/MOP/Instance.pm b/lib/Class/MOP/Instance.pm index fb0dca1..77c5d53 100644 --- a/lib/Class/MOP/Instance.pm +++ b/lib/Class/MOP/Instance.pm @@ -77,7 +77,7 @@ sub set_slot_value { sub initialize_slot { my ($self, $instance, $slot_name) = @_; - #$self->set_slot_value($instance, $slot_name, undef); + return; } sub deinitialize_slot { @@ -145,7 +145,7 @@ sub inline_set_slot_value { sub inline_initialize_slot { my ($self, $instance, $slot_name) = @_; - $self->inline_set_slot_value($instance, $slot_name, 'undef'), + return ''; } sub inline_deinitialize_slot { diff --git a/t/061_instance_inline.t b/t/061_instance_inline.t index 075d960..1679245 100644 --- a/t/061_instance_inline.t +++ b/t/061_instance_inline.t @@ -26,7 +26,7 @@ my $C = 'Class::MOP::Instance'; '... got the right code for set_slot_value'); is($C->inline_initialize_slot($instance, $slot_name), - '$self->{"foo"} = undef', + '', '... got the right code for initialize_slot'); is($C->inline_is_slot_initialized($instance, $slot_name), @@ -56,7 +56,7 @@ my $C = 'Class::MOP::Instance'; '... got the right code for set_slot_value'); is($C->inline_initialize_slot($instance, $slot_name), - '$_[0]->{$attr_name} = undef', + '', '... got the right code for initialize_slot'); is($C->inline_is_slot_initialized($instance, $slot_name),