Reformat _eval_closure a bit and don't use q!! (used q[] instead).
[gitmo/Class-MOP.git] / 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]
     );
 }