diff options
author | Russ Allbery <rra@stanford.edu> | 2007-12-01 01:20:45 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2007-12-01 01:20:45 +0000 |
commit | a4bedfb2e84598b3b0d66cbb2fc30417126124eb (patch) | |
tree | 4e7a889257ff0722f986da55457514a4985ea62a /perl | |
parent | 5500da38b3cbdb153453ace4a344b8c280927b3c (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.pm | 3 |
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}; |