http://www.perlmonks.org?node_id=392202


in reply to Re^2: Being more Assert-ive with Perl
in thread Being more Assert-ive with Perl

>> It's much less verbose than what you're doing,...

> Personally I don't see that. I have looked at Params::Validate before, and I didn't much care for it's style of parameter handling.

When you're validating only one parameter, the framework takes up more space than the declarative parts. But as you start adding more parameters the framework pieces grow at a much slower rate than the declarative parts. But with your code, you'll be adding another "or die" for each parameter.

Anyway, I don't think you have to use it, but I think your optimizations here are seriously premature. You should be using some sort of module for this stuff, not hand-coding it over and over and over, especially since you say you use it everywhere. You could use a source filter if you're really dead set on maximum speed.