Params::Validate::validation_options( normalize_keys => sub { $_[0] =~ s/^-//; lc $_[0] } ); #### my %specs_for = ( foo => # specify a type { type => ARRAYREF }, bar => # specify an interface { can => [ 'print', 'flush', 'frobnicate' ] }, baz => { type => SCALAR, # a scalar ... # ... that is a plain integer ... regex => qr/^\d+$/, callbacks => { # ... and smaller than 90 'less than 90' => sub { shift() < 90 }, }, ); sub wibble { my %args = validate( @_, { foo => $specs_for{foo}, bar => $specs_for{baz}, }); # ... }