Perhaps Params::Validate could be of use?
In reply to Re: Shorten function conditions by Fletch in thread Shorten function conditions by Anonymous Monk