Author: REHSACK
Date: Sat Aug 14 07:54:26 2010
New Revision: 14326

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

Log:
try to guess where no S::S is available and skipp aggregation there, too


Modified: dbi/trunk/t/50dbm_simple.t
==============================================================================
--- dbi/trunk/t/50dbm_simple.t  (original)
+++ dbi/trunk/t/50dbm_simple.t  Sat Aug 14 07:54:26 2010
@@ -75,6 +75,15 @@
     }
 }
 
+my $dbi_sql_nano = $ENV{DBI_SQL_NANO};
+unless( $dbi_sql_nano ) {
+    $@ = undef;
+    eval {
+       require SQL::Statement;
+    };
+    $@ and $dbi_sql_nano = 1;
+}
+
 do "t/lib.pl";
 
 my $dir = test_dir ();
@@ -100,7 +109,7 @@
            [ 1, 'oranges' ],
        ],
        "DELETE FROM fruit", 4,
-       $ENV{DBI_SQL_NANO} ? () : ( "SELECT COUNT(*) FROM fruit", [ [ 0 ] ] ),
+       $dbi_sql_nano ? () : ( "SELECT COUNT(*) FROM fruit", [ [ 0 ] ] ),
        "DROP TABLE fruit", -1,
     ],
     3 => [
@@ -125,7 +134,7 @@
            [ 1, 'oranges', 11 ],
        ],
        "DELETE FROM multi_fruit", 4,
-       $ENV{DBI_SQL_NANO} ? () : ( "SELECT COUNT(*) FROM multi_fruit", [ [ 0 ] 
] ),
+       $dbi_sql_nano ? () : ( "SELECT COUNT(*) FROM multi_fruit", [ [ 0 ] ] ),
        "DROP TABLE multi_fruit", -1,
     ],
 );

Reply via email to