From 1814b1a0b78770c8ba9e7a0adef56c4c324d4064 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 26 Aug 2020 08:17:38 +0000 Subject: 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. --- lib/PublicInbox/OverIdx.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/OverIdx.pm') 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; } -- cgit v1.2.3-24-ge0c7