Reviews by particle



Config-IniFiles (2.52) **

documentation is imprecise, and does not take into account edge cases. api is designed to return undef, even in list context, rather than (). test suite is far from complete. bugs exist when using IO::File objects, and they're completely untested.

particle - 2009-10-22T11:39:31 (permalink)

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

Attempt (1.01) ***

the documentation is consise, as is the code this module provides.

unfortunately, there are bugs in the way delays and retries are handled. this is a classic bug--checking for existance of a key in a hash, without checking whether the value is valid.

here's an example, from the attempt subroutine:

# sleep if we need to

select undef, undef, undef, $args{delay}

if exists $args{delay};

if the delay key exists in the args hash, the select statement is run. but if the value of $args{delay} is undefined, select hangs. whoops!

checking whether the value is defined, and can be properly evaluated by select in numeric context would fix this problem.

similarly, this code

# find out how many attempts we're going to take,

# defaulting to two.

my $tries = exists($args{tries}) ? $args{tries} : 2;

will set $tries to undef if the key exists but is undefined. the same checks mentioned above would fix this problem as well.

overall, this module provides a subroutine that offers great benefits without getting in the way. i look forward to more tests, and bug fixes which will make this bulletproof, production-ready code.

particle - 2004-06-29T08:40:42 (permalink)

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