Params-Util reviews

RSS | Module Info | Add a review of Params-Util

Params-Util (0.33) *****

Nice set of functions for testing validity. Simple. Do the job. ++

Params-Util (0.23) ****

I'll admit that I'm biased, as I contributed these parts, but... I really, really like having the _*LIKE routines around. It makes it much easier to let Perl be Perl and hand in variables that can act like what's needed without having to be exactly that. It lets my code be both flexible and validated.

Params-Util (0.22)

My rating (1 star) only applies to the API.

These functions are the public interface to this module. Then why on earth do their names all start with an underscore? Underscore means "This function is private, don't touch it. Don't even come near it.". And why are their names in uppercase, that by convention always means either a filehandle or a constant?

Params-Util (0.15) *****

Params::Util is a collection of small functions to check data types. For example, _HASH0($var) returns a boolean indicating if $var is a hashref. _INSTANCE($var, $pkg) is just like $var->isa($pkg) but doesn't crash if $var is undef and is faster than eval{$var->isa($pkg)}.

Most of these functions are trivial, and you could probably write the equivalent yourself. But, as a collection they are high-quality and lend concise readability to your code.

My only complaint is that _HASH($var) and _ARRAY($var) return false if the hash or array (respectively) is empty, which is not very intuitive. Instead, you should probably use the awkwardly named _HASH0($var) and _ARRAY0($var).