From 30f707022d89930d31a3d6c83a788f182f65bbaf Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Thu, 19 Jun 2008 23:02:33 +0200 Subject: [PATCH] Use RaiseError as default, since I ended up with 'or die' everywhere --- DB.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DB.pm b/DB.pm index 76cb9dd..43979d8 100644 --- a/DB.pm +++ b/DB.pm @@ -11,7 +11,7 @@ our @EXPORT = qw/DB/; sub DB { #Use domain sockets by default - my $dbh = DBI->connect_cached("dbi:Pg:dbname=ndawn", "ndawn", "", {AutoCommit => 1}); + my $dbh = DBI->connect_cached("dbi:Pg:dbname=ndawn", "ndawn", "", {AutoCommit => 1, RaiseError => 1}); #Easy to also use /etc/postgresql/pg_services.conf #my $dbh = DBI->connect_cached("dbi:Pg:service=ndawn","", "", {AutoCommit => 1}); $dbh->rollback if $dbh->{Executed} || !$dbh->{AutoCommit}; -- 2.39.2