From: Brandon L. Black Date: Tue, 21 Mar 2006 06:52:02 +0000 (+0000) Subject: better way of disabling warnings/errors for DROP TABLE in test X-Git-Tag: v0.07002~75^2~289 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=be1946719ce4ea1f36aa4b9bf42090008ddecc85;p=dbsrgits%2FDBIx-Class.git better way of disabling warnings/errors for DROP TABLE in test --- diff --git a/t/run/145db2.tl b/t/run/145db2.tl index aa721b1..31e3461 100644 --- a/t/run/145db2.tl +++ b/t/run/145db2.tl @@ -14,10 +14,7 @@ DBICTest::Schema->compose_connection('DB2Test' => $dsn, $user, $pass); my $dbh = DB2Test->schema->storage->dbh; -{ - local $SIG{__WARN__} = sub {}; - $dbh->do("DROP TABLE artist;"); -} +$dbh->do("DROP TABLE artist", { RaiseError => 0, PrintError => 0 }); $dbh->do("CREATE TABLE artist (artistid INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), name VARCHAR(255), charfield CHAR(10));");