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

autarch at code2.0beta.co.uk autarch at code2.0beta.co.uk
Thu Jan 22 21:34:33 GMT 2009


Author: autarch
Date: 2009-01-22 13:34:33 -0800 (Thu, 22 Jan 2009)
New Revision: 7357

Modified:
   Class-MOP/trunk/lib/Class/MOP/Method/Generated.pm
Log:
Reformat _eval_closure a bit and don't use q!! (used q[] instead).


Modified: Class-MOP/trunk/lib/Class/MOP/Method/Generated.pm
===================================================================
--- Class-MOP/trunk/lib/Class/MOP/Method/Generated.pm	2009-01-22 04:00:19 UTC (rev 7356)
+++ Class-MOP/trunk/lib/Class/MOP/Method/Generated.pm	2009-01-22 21:34:33 UTC (rev 7357)
@@ -51,11 +51,18 @@
     my $__captures = $_[1];
     eval join(
         "\n",
-        (map {
-            /^([\@\%\$])/
-                or die "capture key should start with \@, \% or \$: $_";
-            q!my !.$_.q! = !.$1.q!{$__captures->{'!.$_.q!'}};!;
-        } keys %$__captures),
+        (
+            map {
+                /^([\@\%\$])/
+                    or die "capture key should start with \@, \% or \$: $_";
+                q[my ]
+                . $_ . q[ = ]
+                . $1
+                . q[{$__captures->{']
+                . $_
+                . q['}};];
+            } keys %$__captures
+        ),
         $_[2]
     );
 }




More information about the Moose-commits mailing list