From 0d517a8c575774387393513ca196aa27211a0b0b Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sat, 1 Dec 2007 03:03:29 +0000 Subject: Following the DBI documentation, turn on AutoCommit after RaiseError so that we have some hope of getting error messages if it fails. --- perl/Wallet/ACL.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perl/Wallet/ACL.pm') diff --git a/perl/Wallet/ACL.pm b/perl/Wallet/ACL.pm index bc318a1..12b3f7c 100644 --- a/perl/Wallet/ACL.pm +++ b/perl/Wallet/ACL.pm @@ -41,9 +41,9 @@ $VERSION = '0.02'; # doesn't exist, throws an exception. sub new { my ($class, $id, $dbh) = @_; - $dbh->{AutoCommit} = 0; $dbh->{RaiseError} = 1; $dbh->{PrintError} = 0; + $dbh->{AutoCommit} = 0; my ($sql, $data, $name); if ($id =~ /^\d+\z/) { $sql = 'select ac_id, ac_name from acls where ac_id = ?'; @@ -77,9 +77,9 @@ sub create { if ($name =~ /^\d+\z/) { die "ACL name may not be all numbers\n"; } - $dbh->{AutoCommit} = 0; $dbh->{RaiseError} = 1; $dbh->{PrintError} = 0; + $dbh->{AutoCommit} = 0; $time ||= time; my $id; eval { -- cgit v1.2.3