Here's the fix for DBI 1.16 to work with perl 5.004: *************** *** 2516,2522 **** SvREFCNT_dec(hv); /* since newRV incremented it */ SvREFCNT_dec(ka_rv); /* since we created it */ } ! else { RETVAL = &sv_undef; } OUTPUT: RETVAL --- 2515,2526 ---- SvREFCNT_dec(hv); /* since newRV incremented it */ SvREFCNT_dec(ka_rv); /* since we created it */ } ! else { ! RETVAL = &sv_undef; ! #if (PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 4)) ! RETVAL = newSV(0); /* mutable undef for 5.004_04 */ ! #endif ! } OUTPUT: RETVAL Tim. On Thu, May 31, 2001 at 01:10:09PM +0200, Merijn Broeren wrote: > Hi, > > Reading the DBI 1.16 README it states : > > Build, test and install Perl 5 (preferably 5.004_04 or later). > > But when I try to build and test DBI 1.16 with 5.00404 it breaks > during testing like this: > > Modification of a read-only value attempted at blib/lib/DBI.pm line > 1130. > > This happens consistently on Solaris 2.5.1 & 2.7, Irix 6.5 and > Linux 2.2 & 2.4. All tests are successful with perl 5.00503 and > perl 5.6.1 on all these platforms. > > The actual test output looks like this : > > t/basics............ok > t/dbidrv............ok > t/examp.............Modification of a read-only value attempted at > blib/lib/DBI.pm line 1130. > dubious > Test returned status 2 (wstat 512, 0x200) > DIED. FAILED tests 65-127 > Failed 63/127 tests, 50.39% okay > t/meta..............ok > t/proxy.............skipping test on this platform > t/shell.............skipping test on this platform > t/subclass..........ok > Failed Test Status Wstat Total Fail Failed List of failed > ------------------------------------------------------------------------------- > t/examp.t 2 512 127 63 49.61% 65-127 > Failed 1/7 test scripts, 85.71% okay. 63/185 subtests failed, 65.95% > okay. > > If I edit t/examp.t to comment out the mortal failures I have > to comment out several calls to fetchall_arrayref, selectall_hashref > and fetchrow_hashref, but not all. The 'Modification of a read-only > variable' error varies in place with the call origination. > > After this undiscerning commenting out in t/examp.t I see the following > result : > > t/examp............. > # failed test 67 at line 215 (row count 0) > # failed test 68 at line 216 (0 vs 31) > # failed test 78 at line 234 > # failed test 80 at line 244 > DBI handle cleared whilst still active. > dbih_clearcom (h 0x21a0a4, com 0x230f08): > FLAGS 0x1011: COMSET Warn Taint > TYPE 3 > PARENT DBI::db=HASH(0x24fc8c) > KIDS 0 (0 active) > IMP_DATA ARRAY(0x25182c) in 'DBD::ExampleP::st' > NUM_OF_FIELDS 3 > NUM_OF_PARAMS 1 > FAILED tests 67-68, 78, 80 > Failed 4/115 tests, 96.52% okay > > I tried to add a explicit ->disconnect to the database handles > to dispose of the 'cleared whilst still active', to no avail. > > So, is the README wrong? Do we need at least 5.00405 or even 5.00503 > to work with 1.16? I don't mind that much, it is a good incentive to > move our developers to 5.005 and 5.6, but it needs to be mentioned > at least. > > Regards, > -- > Merijn Broeren | > Software Geek | Yield to temptation; it may not pass your way again. > |