good chemistry is complicated,
and a little bit messy -LW
Re^3: Being more Assert-ive with Perlby autarch (Hermit)
|on Sep 19, 2004 at 16:05 UTC
>> 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.