{ package A; use Moose; has 'attribute' => ( required => 1, ); } my $x = A->new( attribute => $value ); print $x->attribute # $value