Params-Util reviews

cpanratings
 

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

Params-Util (0.33) *****

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

Adrian Howard - 2008-11-03T10:41:40 (permalink)

1 out of 2 found this review helpful. Was this review helpful to you?  Yes No

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-08T18:58:48 (permalink)

5 out of 5 found this review helpful. Was this review helpful to you?  Yes No

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-01T03:23:55 (permalink)

7 out of 10 found this review helpful. Was this review helpful to you?  Yes No

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-20T12:59:04 (permalink)

10 out of 10 found this review helpful. Was this review helpful to you?  Yes No