package Foo { use Moo; # this is where the magic happens has 'attr_A' => ( default => sub { 'A' } ); has 'attr_B' => ( default => sub { 'B' } ); has 'attr_C' => ( isa => sub { die unless $_[0] > 0 } ); }