Author: REHSACK
Date: Fri Sep  3 11:23:11 2010
New Revision: 14374

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

Log:
simplifying SQL::Statement approval


Modified: dbi/trunk/t/50dbm_simple.t
==============================================================================
--- dbi/trunk/t/50dbm_simple.t  (original)
+++ dbi/trunk/t/50dbm_simple.t  Fri Sep  3 11:23:11 2010
@@ -2,6 +2,10 @@
 $|=1;
 
 use strict;
+use warnings;
+
+require DBD::DBM;
+
 use File::Path;
 use File::Spec;
 use Test::More;
@@ -75,15 +79,7 @@
     }
 }
 
-my $dbi_sql_nano = $ENV{DBI_SQL_NANO};
-unless( $dbi_sql_nano ) {
-    my $haveSS = 0;
-    eval {
-       require SQL::Statement;
-       $haveSS = DBD::DBM::Statement->isa('SQL::Statement');
-    };
-    $dbi_sql_nano = !$haveSS;
-}
+my $dbi_sql_nano = not DBD::DBM::Statement->isa('SQL::Statement');
 
 do "t/lib.pl";
 

Modified: dbi/trunk/t/52dbm_complex.t
==============================================================================
--- dbi/trunk/t/52dbm_complex.t (original)
+++ dbi/trunk/t/52dbm_complex.t Fri Sep  3 11:23:11 2010
@@ -2,6 +2,10 @@
 $| = 1;
 
 use strict;
+use warnings;
+
+require DBD::DBM;
+
 use File::Path;
 use File::Spec;
 use Test::More;
@@ -10,7 +14,6 @@
 use Storable qw(dclone);
 
 my $using_dbd_gofer = ( $ENV{DBI_AUTOPROXY} || '' ) =~ 
/^dbi:Gofer.*transport=/i;
-my $haveSS;
 
 use DBI;
 use vars qw( @mldbm_types @dbm_types );
@@ -67,8 +70,6 @@
         }
     }
 
-    eval { require SQL::Statement; require DBD::DBM; $haveSS = 
DBD::DBM::Statement->isa('SQL::Statement'); };
-
     if ( eval { require List::MoreUtils; } )
     {
         List::MoreUtils->import("part");
@@ -87,13 +88,16 @@
     }
 }
 
+my $haveSS = DBD::DBM::Statement->isa('SQL::Statement');
+
+plan skip_all => "Not running with SQL::Statement" unless ( $haveSS );
+plan skip_all => "Not running with MLDBM" unless ( @mldbm_types );
+plan skip_all => "Needs more love to run with Gofer, too" if( $using_dbd_gofer 
);
+
 do "t/lib.pl";
 
 my $dir = test_dir ();
 
-plan skip_all => "Not running with SQL::Statement" unless ( $haveSS and 
@mldbm_types );
-plan skip_all => "Needs more love to run with Gofer, too" if( $using_dbd_gofer 
);
-
 my $dbh = DBI->connect( 'dbi:DBM:', undef, undef, { f_dir => $dir, } );
 
 my $suffix;

Reply via email to