From a4bedfb2e84598b3b0d66cbb2fc30417126124eb Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sat, 1 Dec 2007 01:20:45 +0000 Subject: Don't do an in-place edit of the SQL inside the object, since we then can't reuse the object with another database handle. --- perl/Wallet/Schema.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl/Wallet/Schema.pm b/perl/Wallet/Schema.pm index 030905e..e39cc81 100644 --- a/perl/Wallet/Schema.pm +++ b/perl/Wallet/Schema.pm @@ -72,7 +72,8 @@ sub create { my $driver = $dbh->{Driver}->{Name}; eval { $dbh->begin_work if $dbh->{AutoCommit}; - for my $sql (@{ $self->{sql} }) { + my @sql = @{ $self->{sql} }; + for my $sql (@sql) { if ($driver eq 'SQLite') { $sql =~ s{auto_increment primary key} {primary key autoincrement}; -- cgit v1.2.3