From: Graham Knop Date: Tue, 14 May 2013 21:34:13 +0000 (-0400) Subject: hard code traits as valid for attribute inflation X-Git-Tag: v1.003000~72 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5bd6dac710ab523d88d3e00847d3882d51700d0d;p=gitmo%2FMoo.git hard code traits as valid for attribute inflation --- diff --git a/lib/Moo/HandleMoose.pm b/lib/Moo/HandleMoose.pm index 635df60..1918522 100644 --- a/lib/Moo/HandleMoose.pm +++ b/lib/Moo/HandleMoose.pm @@ -114,6 +114,8 @@ sub inject_real_metaclass_for { } @{$spec{traits}||[]} ) ); + # have to hard code this because Moose's role meta-model is lacking + $spec_map{traits} ||= 'traits'; $spec{is} = 'ro' if $spec{is} eq 'lazy' or $spec{is} eq 'rwp'; my $coerce = $spec{coerce};