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.
It's almost embarrassing to upload a Hash::HasKeys module to the CPAN,
but I rewrite this code *all* the time (and always forget about "die if
extra_keys()"). Before I embarrass myself by writing and uploading
something so simple and special-purpose, tell me there's something out
there already ...
Cheers,
Ovid
--
If this message is a response to a question on a mailing list, please send
follow up questions to the list.
Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/