From: Dave Rolsky Date: Fri, 20 Feb 2009 17:09:13 +0000 (+0000) Subject: Hey, here's a crazy idea, let's die we try to generate some code that X-Git-Tag: 0.77_01~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e7a64dadc404e79eef5d2524905292f82968e1c4;p=gitmo%2FClass-MOP.git Hey, here's a crazy idea, let's die we try to generate some code that don't work. --- diff --git a/lib/Class/MOP/Method/Generated.pm b/lib/Class/MOP/Method/Generated.pm index cbcc356..dcb2721 100644 --- a/lib/Class/MOP/Method/Generated.pm +++ b/lib/Class/MOP/Method/Generated.pm @@ -49,6 +49,8 @@ sub initialize_body { sub _eval_closure { # my ($self, $captures, $sub_body) = @_; my $__captures = $_[1]; + + local $@; eval join( "\n", ( @@ -65,6 +67,7 @@ sub _eval_closure { ), $_[2] ); + die $@ if $@; } sub _add_line_directive {