http://www.perlmonks.org?node_id=985340


in reply to Re: Moose composing role with required attribute into existing instance
in thread Moose composing role with required attribute into existing instance

I think the arguments to with_traits might be wrong though. I had to modify this:
my $point = with_traits( 'MyClass', ( 'Point', 'Named' ), )->new( x => 1, y => 1, name => 'my_point', );#To satisfy the required values
To this:
my $point = with_traits( 'Point', 'Named', )->new( x => 1, y => 1, name => 'my_point', );#To satisfy the required values
The first argument should be the base class you are composing roles into and all remaining arguments should be roles. I wouldn't have bothered correcting this here but maybe it will help someone else. Excellent solution.