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.
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)
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;
};