On Fri, Sep 05, 2003 at 10:59:31AM +0100, Ben wrote:

> Well, that is true, but I'm also seeing some of the problems caused by not
> having a (strict | anal | strong | paranoid | batshit ) type system. Certain
> types of bugs persist for far longer than they should in > 100000 line
> Perl applications whereas a less laissez-faire type system would flush them
> out basically trivially. 

Which is why my subroutines and methods check that they have been called
with the right parameters, and that those parameters have sane values.

Generally, I don't need to do that much validation, because I'm passing
objects around and can rely on their constructors to have already
validated the data, so just use isa() to check that my parameters are the
right type.  If you need to sanity-check values as well as types,
you should invite Params::Validate into your life, and it can be your
personal and special friend.

-- 
David Cantrell |  Reprobate  | http://www.cantrell.org.uk/david

             If a job's worth doing, it's worth dieing for

Reply via email to