From: Dagfinn Ilmari Mannsåker Date: Tue, 5 Dec 2017 13:45:29 +0000 (+0000) Subject: Fix error handling for Test::PostgreSQL 1.20 X-Git-Tag: v0.11023~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=deb63b428fecec469c20ea31d8c000e0faf5c383;p=dbsrgits%2FSQL-Translator.git Fix error handling for Test::PostgreSQL 1.20 Version 1.20 started throwing instead of returning undef for on errors. It still sets $Test::PostgreSQL::errstr, so use that in the skip message for compatibility with the older versions. --- diff --git a/Changes b/Changes index 3ca6195..9827d9e 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Changes for SQL::Translator + * Fix error handling for Test::PostgreSQL 1.20 + 0.11022 2017-12-04 * Add support for monotonically increasing SQLite autoincs (GH#47) diff --git a/t/postgresql-rename-table-and-field.t b/t/postgresql-rename-table-and-field.t index 830fba9..564f7ad 100644 --- a/t/postgresql-rename-table-and-field.t +++ b/t/postgresql-rename-table-and-field.t @@ -18,7 +18,7 @@ if ($ENV{DBICTEST_PG_DSN}) { else { no warnings 'once'; maybe_plan(undef, 'Test::PostgreSQL'); - $pg_tst = Test::PostgreSQL->new + $pg_tst = eval { Test::PostgreSQL->new } or plan skip_all => "Can't create test database: $Test::PostgreSQL::errstr"; $dsn = $pg_tst->dsn; };