[svn:dbi] r14361 - dbi/trunk/t

[email protected] Mon, 30 Aug 2010 13:49:10 -0700 (PDT)
Newsgroups perl.dbi.changes
Message-ID <[email protected]>
Author: hmbrand
Date: Mon Aug 30 13:49:10 2010
New Revision: 14361

Modified:
   dbi/trunk/t/50dbm_simple.t

Log:
Fix for failing t/50 when old SQL::Statement available (e.g. 1.16)

Thanks Jens, for the quick reply
IRC++

Modified: dbi/trunk/t/50dbm_simple.t
==============================================================================
--- dbi/trunk/t/50dbm_simple.t	(original)
+++ dbi/trunk/t/50dbm_simple.t	Mon Aug 30 13:49:10 2010
@@ -77,11 +77,12 @@
 
 my $dbi_sql_nano = $ENV{DBI_SQL_NANO};
 unless( $dbi_sql_nano ) {
-    $@ = undef;
+    my $haveSS = 0;
     eval {
 	require SQL::Statement;
+	$haveSS = DBD::DBM::Statement->isa('SQL::Statement');
     };
-    $@ and $dbi_sql_nano = 1;
+    $dbi_sql_nano = !$haveSS;
 }
 
 do "t/lib.pl";