X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FMethod%2FDestructor.pm;h=904b4134287cf7b26318fa381f9045d87221cd18;hb=7756897fd756804423cafb8f8806443b768269f0;hp=623e7d7a7687dc447c0735f7710e1ddacdf5c026;hpb=bbf64e76e08d76a06b35685f878fda243abc87c2;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Meta/Method/Destructor.pm b/lib/Mouse/Meta/Method/Destructor.pm index 623e7d7..904b413 100644 --- a/lib/Mouse/Meta/Method/Destructor.pm +++ b/lib/Mouse/Meta/Method/Destructor.pm @@ -16,7 +16,7 @@ sub generate_destructor_method_inline { } join "\n", @code; } else { - ''; # no demolish =) + return sub { }; # no demolish =) } }; @@ -26,12 +26,11 @@ sub generate_destructor_method_inline { $demolishall; } ... - warn $code if $ENV{DEBUG}; local $@; my $res = eval $code; die $@ if $@; - $res; + return $res; } 1;