From: Michael Andreen Date: Thu, 19 Jun 2008 21:02:33 +0000 (+0200) Subject: Use RaiseError as default, since I ended up with 'or die' everywhere X-Git-Url: https://ruin.nu/git/?p=ND.git;a=commitdiff_plain;h=30f707022d89930d31a3d6c83a788f182f65bbaf Use RaiseError as default, since I ended up with 'or die' everywhere --- 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};