about summary refs log tree commit homepage
path: root/lib/PublicInbox/OverIdx.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-08-26 08:17:38 +0000
committerEric Wong <e@yhbt.net>2020-08-27 10:57:24 +0000
commit1814b1a0b78770c8ba9e7a0adef56c4c324d4064 (patch)
tree8bf80366cc71b199f9a99a4cc5cb6a0d8d223dff /lib/PublicInbox/OverIdx.pm
parent71a27b7f45140194566e945ee7957e81abbc67bf (diff)
downloadpublic-inbox-1814b1a0b78770c8ba9e7a0adef56c4c324d4064.tar.gz
over: rename ->connect method to ->dbh
`->connect' is confused with the perlfunc for the `connect(2)'
syscall, and also `DBI->connect'.  Since SQLite doesn't use
sockets, the word "connect" needlessly confuses me.  Give
it a short name to match the field name we use for it, which
also matches the variable name used by the DBI(3pm) and
DBD::SQLite(3pm) manpages.
Diffstat (limited to 'lib/PublicInbox/OverIdx.pm')
-rw-r--r--lib/PublicInbox/OverIdx.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/OverIdx.pm b/lib/PublicInbox/OverIdx.pm
index 9f4a56fb..c521464a 100644
--- a/lib/PublicInbox/OverIdx.pm
+++ b/lib/PublicInbox/OverIdx.pm
@@ -443,7 +443,7 @@ sub commit_lazy {
 sub begin_lazy {
         my ($self) = @_;
         return if $self->{txn};
-        my $dbh = $self->connect or return;
+        my $dbh = $self->dbh or return;
         $dbh->begin_work;
         # $dbh->{Profile} = 2;
         $self->{txn} = 1;
@@ -469,7 +469,7 @@ sub create {
                 File::Path::mkpath(File::Basename::dirname($self->{filename}));
         }
         # create the DB:
-        PublicInbox::Over::connect($self);
+        PublicInbox::Over::dbh($self);
         $self->disconnect;
 }