package Foo { use Moo; has a => (is => "ro"); has b => (is => "ro"); } my $bar = Foo->new(a => 42);