When testing DBI 1.21 with 5.005_03 I got:

t/preparse..........Can't locate Devel/Peek.pm in @INC (@INC contains: blib/arch 
blib/lib /usr/local/perl5.005_03/lib/5.00503/ppc-linux 
/usr/local/perl5.005_03/lib/5.00503/ppc-linux 
/usr/local/perl5.005_03/lib/5.00503/ppc-linux /usr/local/perl5.005_03/lib/5.00503 
/home/schwern/lib/perl5/site_perl /usr/local/perl5.005_03/lib/5.00503/ppc-linux 
/usr/local/perl5.005_03/lib/5.00503/ppc-linux /usr/local/perl5.005_03/lib/5.00503 
/usr/local/perl5.005_03/lib/site_perl/5.005/ppc-linux 
/usr/local/perl5.005_03/lib/site_perl/5.005 . 
/usr/local/perl5.005_03/lib/5.00503/ppc-linux /usr/local/perl5.005_03/lib/5.00503 
/usr/local/perl5.005_03/lib/site_perl/5.005/ppc-linux 
/usr/local/perl5.005_03/lib/site_perl/5.005 .) at t/preparse.t line 4.
BEGIN failed--compilation aborted at t/preparse.t line 4.
dubious
        Test returned status 2 (wstat 512, 0x200)

which comes from a useless use of Devel::Peek in the test.  Devel::Peek was
not distrbuted with Perl until 5.6.0.  Since there is nothing wrong with
DBI, and DBI still supports 5.005_03, the test should not fail.

Since the calls are all commented out and the use is likely for debugging,
the code should either be deleted from the released version, completely
commented out or made smarter.  The patch does the latter.

There are also several warnings from the make (same with 5.005_03 as with
5.6.1).

cc -c   -DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"1.21\" -DXS_VERSION=\"1.21\" -fPIC 
"-I/usr/lib/perl/5.6.1/CORE"  -Wall -Wno-comment -DDBI_NO_THREADS DBI.c
DBI.xs: In function `dbih_clearcom':
DBI.xs:971: warning: unused variable `Perl___notused'
DBI.xs: In function `dbih_get_fbav':
DBI.xs:1109: warning: unused variable `Perl___notused'
DBI.xs: In function `dbih_set_attr_k':
DBI.xs:1201: warning: unused variable `Perl___notused'
DBI.xs: In function `log_where':
DBI.xs:1743: warning: unused variable `Perl___notused'
DBI.xs: In function `XS_DBI_dispatch':
DBI.xs:2275: warning: unused variable `Perl___notused'


--- t/preparse.t        2002/05/02 18:15:20     1.1
+++ t/preparse.t        2002/05/02 18:19:33
@@ -1,7 +1,6 @@
 #!perl -w
 
 use DBI qw(:preparse_flags);
-use Devel::Peek 'Dump';
 
 $|=1;
 sub ok($;$);
@@ -96,8 +95,6 @@
 
 sub ok ($;$) {
     my ($result, $expected) = @_;
-    # Dump ($result);
-    # Dump ($expected);
     my $ok;
     if (@_ == 1) {
        $ok = $result;
@@ -108,6 +105,12 @@
     } else {
        $ok = $result eq $expected;
     }
+
+    if( !$ok && eval q{require Devel::Peek} ) {
+        print STDERR Devel::Peek::Dump($result);
+        print STDERR Devel::Peek::Dump($expected);
+    }
+
     ++$t;
     ($ok) ? print "ok $t\n" : print "not ok $t\n";
     $expected = "undef" if !defined $expected;


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
Don't treat people this way!  Milk & Cheese are indestructible!  You are not!

Reply via email to