#only there for the validator below which do stuff after build. sub BUILD {} has '_creative_validators' => ( is => 'ro', default => sub { [] }, ); sub register_validator { my ($class, $sub) = @_; $class->can('after')->(BUILD => sub { my ($self) = @_; push @{$self->_creative_validators}, $sub; }); } #### use Moo::Role; with 'Weborama::Collect::CreativesValidator'; #you have to define that one requires qw/creatives_validator_publisher_forced_pause_settings/; __PACKAGE__->register_validator(sub { my ( $self, @creatives ) = @_; ... })