The Perl 5 module Declare::Constraints::Simple provides an easy way to build a profile to validate a data structure. It does this by giving you a set of declarative keywords in the importing namespace.