aboutsummaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2007-12-01 01:20:45 +0000
committerRuss Allbery <rra@stanford.edu>2007-12-01 01:20:45 +0000
commita4bedfb2e84598b3b0d66cbb2fc30417126124eb (patch)
tree4e7a889257ff0722f986da55457514a4985ea62a /perl
parent5500da38b3cbdb153453ace4a344b8c280927b3c (diff)
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.
Diffstat (limited to 'perl')
-rw-r--r--perl/Wallet/Schema.pm3
1 files changed, 2 insertions, 1 deletions
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};