From: Matt S Trout Date: Tue, 17 Apr 2012 17:58:56 +0000 (+0000) Subject: cleanup X-Git-Tag: v0.091000~14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8863604c01d63bd56af285e91dcc1671c4725ed4;p=gitmo%2FMoo.git cleanup --- diff --git a/lib/Moo/HandleMoose.pm b/lib/Moo/HandleMoose.pm index 66f58bd..6656e14 100644 --- a/lib/Moo/HandleMoose.pm +++ b/lib/Moo/HandleMoose.pm @@ -73,12 +73,9 @@ sub inject_real_metaclass_for { my $attr = perlstring($name); my $tc = Moose::Meta::TypeConstraint->new( constraint => sub { die "This is not going to work" }, - inlined => sub { 'my $res = $_[42]{'.$attr.'}; $_[42]{'.$attr.'} = 1; $res' }, - #coercion => Moose::Meta::TypeCoercion->new( - # type_coercion_map => [ - # 'Item', $coerce - # ] - #) + inlined => sub { + 'my $r = $_[42]{'.$attr.'}; $_[42]{'.$attr.'} = 1; $r' + }, ); $tc->coercion(Moose::Meta::TypeCoercion->new) ->_compiled_type_coercion($coerce);