From: Dave Rolsky Date: Sat, 21 Mar 2009 15:13:29 +0000 (-0500) Subject: We are never going to make a destructor object and then find out it X-Git-Tag: 0.78_02~12^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7669fbc411d9f2efa6a6572774eb054829b7111c;p=gitmo%2FClass-MOP.git We are never going to make a destructor object and then find out it isn't needed, because we already check if it's needed before making it! --- diff --git a/lib/Class/MOP/Immutable.pm b/lib/Class/MOP/Immutable.pm index 076fbab..41fa4ea 100644 --- a/lib/Class/MOP/Immutable.pm +++ b/lib/Class/MOP/Immutable.pm @@ -183,8 +183,6 @@ sub _inline_destructor { name => 'DESTROY' ); - return unless $destructor->is_needed; - $metaclass->add_method( 'DESTROY' => $destructor ) }