Forgot to mention, this applies to SQL-Statement-1.15 with ActiveState
Perl 5.8.8 on Windows XP/SP2.
[Keith Gorlen (Contractor)]
Show quoted text> -----Original Message-----
> From: Bugs in SQL-Statement via RT
> [mailto:bug-SQL-Statement@rt.cpan.org]
> Sent: Thursday, November 08, 2007 1:24 PM
> To: Gorlen, Keith (NIH/CIT) [C]
> Subject: [rt.cpan.org #30590] AutoReply: Bug in
> SQL::Statement::is_number()
>
>
> Greetings,
>
> This message has been automatically generated in response to
> the creation of a trouble ticket regarding:
> "Bug in SQL::Statement::is_number()",
> a summary of which appears below.
>
> There is no need to reply to this message right now. Your
> ticket has been assigned an ID of [rt.cpan.org #30590]. Your
> ticket is accessible on the web at:
>
>
http://rt.cpan.org/Ticket/Display.html?id=30590
>
> Please include the string:
>
> [rt.cpan.org #30590]
>
> in the subject line of all future correspondence about this
> issue. To do so, you may reply to this message.
>
> Thank you,
> bug-SQL-Statement@rt.cpan.org
>
> --------------------------------------------------------------
> -----------
> DBI::looks_like_number(@array) returns a list, not a scalar,
> as assumed by SQL::Statement::is_number(), resulting in
> "Argument <blah> isn't numeric in numeric comparison (<=>) at
> Statement.pm line 972" errors.
> To fix, I defined as:
>
> sub is_number {
> for my $x(@_) {
> return 0 if !defined $x;
> return 0 if $HAS_DBI && DBI::looks_like_number($x);
> return 0 if $x !~ $numexp;
> }
> return 1;
> };
>
> Thanks,
> ---
> Keith Gorlen (Contractor)
> Center for Information Technology, National Institutes of Health
> Phone: 415-563-3083 (San Francisco), Email: kg2d@nih.gov
>
>
>
>