[Moose-commits] r7742 - Class-MOP/trunk/lib/Class/MOP/Method

autarch at code2.0beta.co.uk autarch at code2.0beta.co.uk
Fri Feb 20 17:09:13 GMT 2009


Author: autarch
Date: 2009-02-20 09:09:13 -0800 (Fri, 20 Feb 2009)
New Revision: 7742

Modified:
   Class-MOP/trunk/lib/Class/MOP/Method/Generated.pm
Log:
Hey, here's a crazy idea, let's die we try to generate some code that
don't work.


Modified: Class-MOP/trunk/lib/Class/MOP/Method/Generated.pm
===================================================================
--- Class-MOP/trunk/lib/Class/MOP/Method/Generated.pm	2009-02-20 09:01:58 UTC (rev 7741)
+++ Class-MOP/trunk/lib/Class/MOP/Method/Generated.pm	2009-02-20 17:09:13 UTC (rev 7742)
@@ -49,6 +49,8 @@
 sub _eval_closure {
     # my ($self, $captures, $sub_body) = @_;
     my $__captures = $_[1];
+
+    local $@;
     eval join(
         "\n",
         (
@@ -65,6 +67,7 @@
         ),
         $_[2]
     );
+    die $@ if $@;
 }
 
 sub _add_line_directive {




More information about the Moose-commits mailing list