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 0/2] naming consistency cleanups
@ 2019-04-16  1:10  4% Eric Wong
  2019-04-16  1:10  7% ` [PATCH 2/2] import: prefix 'inbox' with '-' to denote Inbox ref Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2019-04-16  1:10 UTC (permalink / raw)
  To: meta

Since we (and most Perl5 codebases) don't declare types with "my",
naming things consistently should reduce confusion and make the code
easier-to-follow/learn.

More to come...

Eric Wong (2):
  cleanup: use '$ibx' consistently when referring to Inbox refs
  import: prefix 'inbox' with '-' to denote Inbox ref

 lib/PublicInbox/AltId.pm       |  8 ++++----
 lib/PublicInbox/Config.pm      |  4 ++--
 lib/PublicInbox/Import.pm      |  6 +++---
 lib/PublicInbox/NewsWWW.pm     |  6 +++---
 lib/PublicInbox/SearchView.pm  |  4 ++--
 lib/PublicInbox/Unsubscribe.pm |  4 ++--
 lib/PublicInbox/View.pm        | 16 ++++++++--------
 lib/PublicInbox/WWW.pm         | 14 +++++++-------
 lib/PublicInbox/WwwStream.pm   | 24 ++++++++++++------------
 t/altid.t                      |  6 +++---
 10 files changed, 46 insertions(+), 46 deletions(-)

-- 
EW


^ permalink raw reply	[relevance 4%]

* [PATCH 2/2] import: prefix 'inbox' with '-' to denote Inbox ref
  2019-04-16  1:10  4% [PATCH 0/2] naming consistency cleanups Eric Wong
@ 2019-04-16  1:10  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2019-04-16  1:10 UTC (permalink / raw)
  To: meta

This is for consistency with other fields which follow
this pattern w.r.t. field-naming when referring to internal
fields.
---
 lib/PublicInbox/Import.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index fc4e72d..c775575 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -30,7 +30,7 @@ sub new {
 		ident => "$name <$email>",
 		mark => 1,
 		ref => $ref,
-		inbox => $ibx,
+		-inbox => $ibx,
 		path_type => '2/38', # or 'v2'
 		lock_path => "$git->{git_dir}/ssoma.lock", # v2 changes this
 		bytes_added => 0,
@@ -178,7 +178,7 @@ sub _update_git_info ($$) {
 	run_die([@cmd, 'update-server-info'], undef);
 	($self->{path_type} eq '2/38') and eval {
 		require PublicInbox::SearchIdx;
-		my $ibx = $self->{inbox} || $git_dir;
+		my $ibx = $self->{-inbox} || $git_dir;
 		my $s = PublicInbox::SearchIdx->new($ibx);
 		$s->index_sync({ ref => $self->{ref} });
 	};
-- 
EW


^ permalink raw reply related	[relevance 7%]

Results 1-2 of 2 | reverse | sort options + mbox downloads above
-- links below jump to the message on this page --
2019-04-16  1:10  4% [PATCH 0/2] naming consistency cleanups Eric Wong
2019-04-16  1:10  7% ` [PATCH 2/2] import: prefix 'inbox' with '-' to denote Inbox ref 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).