DBI question: binding params in HAVING clauses

Dave Cross dave at dave.org.uk
Fri Jan 27 14:03:31 GMT 2006


David Cantrell wrote:

> $val = $dbh->quote($val) if($val !~/^-?\d+(\.\d+)?$/);
> 
> and things are beginning to look really messy.  Not to mention that I
> got the regex wrong twice.  Which gets me back to wanting placeholders.

That's why we have Regexp::Common.

   http://search.cpan.org/dist/Regexp-Common/lib/Regexp/Common/number.pm

Dave...

-- 
Site: http://dave.org.uk/
Blog: http://blog.dave.org.uk/
Code: http://dave.org.uk/code/


More information about the london.pm mailing list