chiark / gitweb /
CommodsDatabase: In db_connect_core, break out $opts into a variable
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 3 Apr 2016 13:17:15 +0000 (14:17 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 3 Apr 2016 13:17:15 +0000 (14:17 +0100)
No functional change

yarrg/CommodsDatabase.pm

index f704f12..0d491c4 100644 (file)
@@ -64,10 +64,10 @@ sub dbr_connect ($$) {
 
 sub db_connect_core ($) {
     my ($fn)= @_;
-    my $h= DBI->connect("dbi:SQLite:$fn",'','',
-                      { AutoCommit=>0,
-                        RaiseError=>1, ShowErrorStatement=>1,
-                        sqlite_unicode=>1 })
+    my $opts = { AutoCommit=>0,
+                RaiseError=>1, ShowErrorStatement=>1,
+                sqlite_unicode=>1 };
+    my $h= DBI->connect("dbi:SQLite:$fn",'','',$opts)
        or die "$fn $DBI::errstr ?";
     return $h;
     # default timeout is 30s which is plenty