A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Why should you validate parameters to all subroutines?

A list of reasons:

  • If you don't catch bad data immediately, it will be propagated onwards and the program may fail in an unexpected way
    • The problem and may not even be caught by your tests if the bad data is passed on to an external system and not checked by you


Use MooseX::Params::Validate, or Params::Validate.