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

4 out of 4 found this review helpful:

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.

Ricardo SIGNES - 2007-05-08 18:58:48
Was this review helpful to you?  Yes No

7 out of 9 found this review helpful:

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?

Bart Lateur - 2006-11-01 03:23:55
Was this review helpful to you?  Yes No

9 out of 9 found this review helpful:

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).

Chris Dolan - 2006-07-20 12:59:04
Was this review helpful to you?  Yes No


the camel