Reviews by Knut Behrends

cpanratings
 

RSS

MooseX-MethodPrivate (0.1.2)

The code for this Module is very short ( the source code fits on a single 19 inch screen... look at it at the cpan website), however, it is still a nuisance to install this module. It uses Module::Install, and this module and its testscripts drag in another whole lot of (unnecessary?) dependencies. When Module::Build is done, MooseX-MethodPrivate is still marked as dirty to the cpan shell, and I had to leave the cpan shell, run perl Makefile.PL make - make test - make install in the .cpan/build directory). These problems are secondary, not related to the module itself, but installing it took me so long I do not want give it a rating.

Knut Behrends - 2010-02-10T07:18:49 (permalink)

Was this review helpful to you?  Yes No

Test-DatabaseRow (1.04) ****

I found that the module does not always construct a SQL WHERE clause properly. Integers are quoted (where age = '23') although they should not be (where age = 23). With quoted ints the sql call fails on sybase. Tested with DBD::Sybase, (version 0.90 with freetds-based client libraries on linux and the 1.09 sybase-based client libraries on solaris).

Workaround:
The source code is quite easy to read and understand, so, in the DatabaseRow.pm file, I changed the last lines of the _build_select() method

BEFORE
# proper value, quote it properly
push @conditions, "$field $oper " . $args{dbh}->quote($value);

AFTER
# proper value, quote it properly
if ($value =~ /^$RE{num}{real}/){

push @conditions, "$field $oper " . $value;
} else {

push @conditions, "$field $oper " . $args{dbh}->quote($value);
}

Not sure if this is the right place to submit code like this, but it may not even a bug in the first place - just a misconfiguration on my side.

Knut Behrends - 2009-08-07T02:35:25 (permalink)

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