Type constraints to the rescue

has 'config' => (
   is  => 'ro',
   isa => 'HashRef',
);

Class->new(config => 'foo'); 
continued...