Reformat _eval_closure a bit and don't use q!! (used q[] instead).
Dave Rolsky [Thu, 22 Jan 2009 21:34:33 +0000 (21:34 +0000)]
lib/Class/MOP/Method/Generated.pm

index 9475c92..17b8cde 100644 (file)
@@ -51,11 +51,18 @@ sub _eval_closure {
     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]
     );
 }