Re: Class::DBI 0.96 and perl 5.8.3 - bad combo?

[prev] [thread] [next] [Date index for 2005/04/12]

From: Dave Howorth
Subject: Re: Class::DBI 0.96 and perl 5.8.3 - bad combo?
Date: 07:18 on 12 Apr 2005
Dan Sully wrote:
> * Dave Howorth shaped the electrons to say...
> 
>>>> cpepc210-1:~/.cpan/build/Class-DBI-0.96 # make test
>>>> ...snip...
>>>> t/16-reserved.........ok 2/5Argument "Bad Taste" isn't numeric in 
>>>> subroutine entry at 
>>>
>>> What version of DBD::SQLite are you using?
>>
>> The file says:
>> # $Id: SQLite.pm,v 1.44 2004/09/10 15:25:46 matt Exp $
>> $VERSION = '1.05';
>>
>> but when I go into cpan:
> 
> Multiple versions installed maybe? I ask, because I've seen that "isn't
> numeric in.." with 1.08 - Matt doesn't think it's a problem however.

Well this morning the reason is more clear than when running for my 
train last night. I printed the version in a window on a different 
machine! Oops. Anyway, on the correct machine it is 1.08 installed.

> My fix was:
> 
> diff -ru DBD-SQLite-1.08/dbdimp.c DBD-SQLite-1.08.fixed/dbdimp.c
> --- DBD-SQLite-1.08/dbdimp.c    Tue Feb 22 08:09:23 2005
> +++ DBD-SQLite-1.08.fixed/dbdimp.c    Mon Feb 28 23:23:59 2005
> @@ -357,7 +357,7 @@
>             char * data = SvPV(value, len);
>             retval = sqlite3_bind_blob(imp_sth->stmt, i+1, data, len, 
> SQLITE_TRANSIENT);
>         }
> -        else if (looks_like_number(value)) {
> +        else if (SvNIOK(value)) {
>             /* bind ordinary numbers as numbers - otherwise we might 
> sort wrong */
>             retval = sqlite3_bind_double(imp_sth->stmt, i+1, SvNV(value));
>         }

So I tried your change but then DBD::SQLite's tests fail where they 
don't with the official version:

cpepc210-1:~/.cpan/build/DBD-SQLite-1.08 # make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" 
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00basic...............ok 

t/01logon...............ok 

t/02cr_table............ok 

t/03insert..............ok 

         1/10 skipped: last_insert_id requires DBI v1.43
t/04select..............ok 12/21# Test 14 got: '' (t/04select.t at line 
33)
#    Expected: '1' (Check num_rows (2) == 1)
#  t/04select.t line 33 is: ok($num_rows == 1, 1, "Check num_rows 
($num_rows) == 1");
t/04select..............ok 19/21# Failed test 21 in t/04select.t at line 
50
#  t/04select.t line 50 is: ok($num_rows == 1);
t/04select..............FAILED tests 14, 21 

	Failed 2/21 tests, 90.48% okay
t/05tran................ok 

t/06error...............ok 

t/08create_function.....ok

Cheers, Dave

Class::DBI 0.96 and perl 5.8.3 - bad combo?
merlyn (Randal L. Schwartz) 17:28 on 06 Apr 2005

RE: Class::DBI 0.96 and perl 5.8.3 - bad combo?
Thomas, Mark - BLS CTR 18:11 on 06 Apr 2005

Re: Class::DBI 0.96 and perl 5.8.3 - bad combo?
merlyn (Randal L. Schwartz) 18:21 on 06 Apr 2005

Re: Class::DBI 0.96 and perl 5.8.3 - bad combo?
Perrin Harkins 18:28 on 06 Apr 2005

RE: Class::DBI 0.96 and perl 5.8.3 - bad combo?
Thomas, Mark - BLS CTR 18:30 on 06 Apr 2005

Re: Class::DBI 0.96 and perl 5.8.3 - bad combo?
Dave Howorth 09:37 on 11 Apr 2005

Re: Class::DBI 0.96 and perl 5.8.3 - bad combo?
Dave Howorth 16:25 on 11 Apr 2005

Re: Class::DBI 0.96 and perl 5.8.3 - bad combo?
Dave Howorth 07:18 on 12 Apr 2005

Re: Class::DBI 0.96 and perl 5.8.3 - bad combo?
Masayoshi Sekimura 02:11 on 11 May 2005

Re: Class::DBI 0.96 and perl 5.8.3 - bad combo?
Dave Howorth 09:59 on 11 May 2005

Generated at 06:54 on 17 May 2005 by mariachi v0.52