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] make Filesys::Notify::Simple optional
  2020-01-10  8:49  6% [PATCH 0/2] Plack and Filesys::Notify::Simple are optional Eric Wong
@ 2020-01-10  8:49  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-01-10  8:49 UTC (permalink / raw)
  To: meta

It's only used by us in public-inbox-watch, and maybe not
for long.  It's in most installations because Plack pulls it
in though, but Plack is no longer required.
---
 Makefile.PL                     | 2 +-
 ci/deps.perl                    | 5 ++---
 lib/PublicInbox/WatchMaildir.pm | 3 ++-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile.PL b/Makefile.PL
index 6b20385a..94ec16c6 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -132,7 +132,7 @@ WriteMakefile(
 
 		# Filesys::Notify::Simple is pulled in by Plack, but also
 		# needed by public-inbox-watch (for now)
-		'Filesys::Notify::Simple' => 0,
+		# 'Filesys::Notify::Simple' => 0,
 
 		# TODO: this should really be made optional...
 		'URI::Escape' => 0,
diff --git a/ci/deps.perl b/ci/deps.perl
index 08722e1c..93cc5d25 100755
--- a/ci/deps.perl
+++ b/ci/deps.perl
@@ -14,8 +14,7 @@ my @test_essential = qw(Test::Simple); # we actually use Test::More
 # package profiles
 my $profiles = {
 	# the smallest possible profile for testing
-	# TODO: trim this, Plack pulls in Filesys::Notify::Simple,
-	# and we don't need that for mda-only installs
+	# TODO: trim URI::Escape from this, maybe
 	essential => [ qw(
 		git
 		perl
@@ -26,7 +25,6 @@ my $profiles = {
 		Email::MIME::ContentType
 		Encode
 		ExtUtils::MakeMaker
-		Filesys::Notify::Simple
 		URI::Escape
 		), @test_essential ],
 
@@ -36,6 +34,7 @@ my $profiles = {
 		BSD::Resource
 		DBD::SQLite
 		DBI
+		Filesys::Notify::Simple
 		IO::Compress::Gzip
 		Inline::C
 		Net::Server
diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm
index 8a8c1262..5d0515e0 100644
--- a/lib/PublicInbox/WatchMaildir.pm
+++ b/lib/PublicInbox/WatchMaildir.pm
@@ -203,7 +203,8 @@ sub watch {
 
 	# lazy load here, we may support watching via IMAP IDLE
 	# in the future...
-	require Filesys::Notify::Simple;
+	eval { require Filesys::Notify::Simple } or
+		die "Filesys::Notify::Simple is currently required for $0\n";
 	my $fsn = Filesys::Notify::Simple->new([@{$self->{mdir}}, $scandir]);
 	$fsn->wait($cb) until $self->{quit};
 }

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/2] Plack and Filesys::Notify::Simple are optional
@ 2020-01-10  8:49  6% Eric Wong
  2020-01-10  8:49  7% ` [PATCH 2/2] make Filesys::Notify::Simple optional Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-01-10  8:49 UTC (permalink / raw)
  To: meta

Not everybody cares for web interfaces or watching Maildirs.
Increase the flexibility of the installation by making these
optional so (nntpd|mda)-only installations can be a thing.

Eric Wong (2):
  make Plack optional for non-WWW and non-httpd users
  make Filesys::Notify::Simple optional

 INSTALL                         | 10 +++++-----
 Makefile.PL                     | 10 ++++++++--
 ci/deps.perl                    | 10 +++++-----
 lib/PublicInbox/WatchMaildir.pm |  3 ++-
 script/public-inbox-httpd       | 15 +++++++++------
 script/public-inbox.cgi         | 15 +++++++++------
 t/cgi.t                         |  1 +
 t/httpd-https.t                 |  2 +-
 t/psgi_attach.t                 |  6 ++----
 t/psgi_bad_mids.t               |  4 ++--
 t/psgi_mount.t                  | 17 ++++++++---------
 t/psgi_multipart_not.t          |  2 +-
 t/psgi_search.t                 |  2 +-
 t/psgi_text.t                   |  5 ++---
 t/psgi_v2.t                     |  2 +-
 t/solver_git.t                  |  2 +-
 t/view.t                        |  3 ++-
 xt/mem-msgview.t                |  3 +--
 xt/perf-msgview.t               |  2 +-
 xt/solver.t                     |  2 +-
 20 files changed, 63 insertions(+), 53 deletions(-)

^ permalink raw reply	[relevance 6%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-01-10  8:49  6% [PATCH 0/2] Plack and Filesys::Notify::Simple are optional Eric Wong
2020-01-10  8:49  7% ` [PATCH 2/2] make Filesys::Notify::Simple optional 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).