On Aug 12, 2005, at 3:04 PM, Ovid wrote:
Hi all,
Sometimes the CPAN doesn't provide the trivial things I need. For
example, I am often doing something conceptually similar to this:
sub foo {
my $args = shift;
croak $message unless is_deeply [sort keys %$args], [EMAIL PROTECTED];
foreach (@default) {
$args->{$_} = $some_default unless exists $args->{$_};
}
croak if extra_keys($args);
# do stuff
}
This is simple, but I'm tired of rewriting it. Params::Validate can
handle it, but I don't want to fire up a diesel engine when this is all
I need.
I wouldn't be so sure. Params::Validate is pretty nice for this kind
of thing, and has been tested for a long time. Before discounting it,
have you measured the actual resource impact?
-Ken