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 5/5] cgit: type declaration for PublicInbox::Git
  2019-12-31 10:30  4% [PATCH 0/5] some minor cleanups and doc updates Eric Wong
@ 2019-12-31 10:30  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2019-12-31 10:30 UTC (permalink / raw)
  To: meta

AFAIK this doesn't do anything for Perl internally since
PublicInbox::Git doesn't "use fields", but it makes it easier for
humans readers to follow and ensure we're not passing unblessed
or non-ref scalars to PublicInbox::GitHTTPBackend::serve.
---
 lib/PublicInbox/Cgit.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/PublicInbox/Cgit.pm b/lib/PublicInbox/Cgit.pm
index ab4065bd..36239438 100644
--- a/lib/PublicInbox/Cgit.pm
+++ b/lib/PublicInbox/Cgit.pm
@@ -8,6 +8,7 @@
 package PublicInbox::Cgit;
 use strict;
 use PublicInbox::GitHTTPBackend;
+use PublicInbox::Git;
 # not bothering with Exporter for a one-off
 *r = *PublicInbox::GitHTTPBackend::r;
 *input_prepare = *PublicInbox::GitHTTPBackend::input_prepare;
@@ -109,7 +110,7 @@ sub call {
 	# handle requests without spawning cgit iff possible:
 	if ($path_info =~ m!\A/(.+?)/($PublicInbox::GitHTTPBackend::ANY)\z!ox) {
 		my ($nick, $path) = ($1, $2);
-		if (my $git = $self->{"\0$nick"}) {
+		if (my PublicInbox::Git $git = $self->{"\0$nick"}) {
 			return serve($env, $git, $path);
 		}
 	} elsif ($path_info =~ m!$self->{static}! &&

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/5] some minor cleanups and doc updates
@ 2019-12-31 10:30  4% Eric Wong
  2019-12-31 10:30  7% ` [PATCH 5/5] cgit: type declaration for PublicInbox::Git Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2019-12-31 10:30 UTC (permalink / raw)
  To: meta

Actual features coming, later, but some cleanups and internal
doc updates I found along the way.  I'm a tiny bit worried
about PATCH 3/5 breaking somebody's setup because of old
versions of examples/public-inbox.psgi, but considering how
little adoption this project had in 2016, maybe it's not a
big deal...

Eric Wong (5):
  wwwstatic: getline: die on missing psgix.io
  http: update comment about psgix.io usage
  githttpbackend: remove ancient compatibility check
  filter/base: export REJECT as a constant
  cgit: type declaration for PublicInbox::Git

 lib/PublicInbox/Cgit.pm           |  3 ++-
 lib/PublicInbox/Filter/Base.pm    |  2 ++
 lib/PublicInbox/GitHTTPBackend.pm |  3 ---
 lib/PublicInbox/HTTP.pm           |  2 +-
 lib/PublicInbox/InboxWritable.pm  |  3 +--
 lib/PublicInbox/WatchMaildir.pm   |  3 +--
 lib/PublicInbox/WwwStatic.pm      | 20 +++++++++-----------
 script/public-inbox-purge         |  4 +---
 8 files changed, 17 insertions(+), 23 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 --
2019-12-31 10:30  4% [PATCH 0/5] some minor cleanups and doc updates Eric Wong
2019-12-31 10:30  7% ` [PATCH 5/5] cgit: type declaration for PublicInbox::Git 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).