[DBIx-Class-Devel] [sql-translator] Topic/producer postgresql batch alter table (#44)

Dagfinn Ilmari Mannsåker notifications at github.com
Fri Aug 22 14:27:35 GMT 2014


> +use Test::Exception;
> +use DBI;
> +use SQL::Translator;
> +use SQL::Translator::Parser::PostgreSQL;
> +use SQL::Translator::Diff;
> +
> +eval "use DBD::Pg";
> +plan skip_all => "DBD::Pg required" if $@;
> +
> +eval "use Test::PostgreSQL";
> +plan skip_all => "Test::PostgreSQL required" if $@;
> +
> +my ( $pgsql, $dbh , $ddl, $ret );
> +
> +lives_ok { $pgsql = Test::PostgreSQL->new() } "create PostgreSQL instance";
> +lives_ok { $dbh = DBI->connect($pgsql->dsn) } "dbi connect";

Given that continuing if these fail is pointless, there's no point in wrapping them in lives_ok (which is effectively an eval).

---
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/sql-translator/pull/44/files#r16600181
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20140822/45a89f5e/attachment.htm>


More information about the DBIx-Class-Devel mailing list