1use Test::More; 2 3{ 4 package Foos; 5 use Moos; 6 has attr => (required => 1); 7} 8 9ok eval { Foos->new(attr => 42) }; 10ok not eval { Foos->new(attx => 42) }; 11 12done_testing(); 13