user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 2/2] clone: allow running without DBI / DBD::SQLite
  2023-07-27 21:18  4% [PATCH 0/2] minimal system fixes Eric Wong
@ 2023-07-27 21:18  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2023-07-27 21:18 UTC (permalink / raw)
  To: meta

Due to historic reasons, LeiQuery.pm gets loaded with LEI.pm and
-clone depends on LEI.  So delay loading any DBI-dependent
modules until querying is actually required.
---
 lib/PublicInbox/LeiQuery.pm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/PublicInbox/LeiQuery.pm b/lib/PublicInbox/LeiQuery.pm
index 3337e5d4..26cfb3fd 100644
--- a/lib/PublicInbox/LeiQuery.pm
+++ b/lib/PublicInbox/LeiQuery.pm
@@ -4,9 +4,7 @@
 # handles "lei q" command and provides internals for
 # several other sub-commands (up, lcat, ...)
 package PublicInbox::LeiQuery;
-use strict;
-use v5.10.1;
-use PublicInbox::OverIdx;
+use v5.12;
 
 sub prep_ext { # externals_each callback
 	my ($lxs, $exclude, $loc) = @_;
@@ -18,6 +16,7 @@ sub _start_query { # used by "lei q" and "lei up"
 	require PublicInbox::LeiOverview;
 	PublicInbox::LeiOverview->new($self) or return;
 	my $opt = $self->{opt};
+	require PublicInbox::OverIdx; # loads DBI
 	PublicInbox::OverIdx::fork_ok($opt);
 	my ($xj, $mj) = split(/,/, $opt->{jobs} // '');
 	(defined($xj) && $xj ne '' && $xj !~ /\A[1-9][0-9]*\z/) and

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/2] minimal system fixes
@ 2023-07-27 21:18  4% Eric Wong
  2023-07-27 21:18  7% ` [PATCH 2/2] clone: allow running without DBI / DBD::SQLite Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2023-07-27 21:18 UTC (permalink / raw)
  To: meta

Eric Wong (2):
  Makefile.pl: *.cols: account for non-UTF-8-aware awk
  clone: allow running without DBI / DBD::SQLite

 Makefile.PL                 | 2 +-
 lib/PublicInbox/LeiQuery.pm | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

^ permalink raw reply	[relevance 4%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-07-27 21:18  4% [PATCH 0/2] minimal system fixes Eric Wong
2023-07-27 21:18  7% ` [PATCH 2/2] clone: allow running without DBI / DBD::SQLite Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).