From: gfx Date: Sat, 1 Aug 2009 06:26:16 +0000 (+0900) Subject: Change clearers to return true for compatibility X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7771c1b35f13a8d852f7a2bb0fcaa28b140b5d04;p=gitmo%2FClass-MOP.git Change clearers to return true for compatibility --- diff --git a/lib/Class/MOP/Attribute.pm b/lib/Class/MOP/Attribute.pm index d36025c..635f5d7 100644 --- a/lib/Class/MOP/Attribute.pm +++ b/lib/Class/MOP/Attribute.pm @@ -364,7 +364,7 @@ sub clear_value { ->get_meta_instance ->deinitialize_slot($instance, $self->name); $self->call_trigger($instance); - return; + return 1; } ## load em up ... diff --git a/lib/Class/MOP/Method/Accessor.pm b/lib/Class/MOP/Method/Accessor.pm index 26207aa..8ff4a28 100644 --- a/lib/Class/MOP/Method/Accessor.pm +++ b/lib/Class/MOP/Method/Accessor.pm @@ -290,7 +290,7 @@ sub _generate_clearer_method_inline { 'sub {' . $meta_instance->inline_deinitialize_slot('$_[0]', $attr_name) . ';' . $self->_inline_call_trigger($attr, '$_[0]') - . 'return;' + . 'return 1;' . '}', ); confess "Could not generate inline clearer because : $e" if $e;