From: Dave Rolsky Date: Thu, 22 Jan 2009 21:34:33 +0000 (+0000) Subject: Reformat _eval_closure a bit and don't use q!! (used q[] instead). X-Git-Tag: 0.76~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2507ef3a907f0314dc5481cea376bbb62665c4c3;p=gitmo%2FClass-MOP.git Reformat _eval_closure a bit and don't use q!! (used q[] instead). --- diff --git a/lib/Class/MOP/Method/Generated.pm b/lib/Class/MOP/Method/Generated.pm index 9475c92..17b8cde 100644 --- a/lib/Class/MOP/Method/Generated.pm +++ b/lib/Class/MOP/Method/Generated.pm @@ -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] ); }