about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/AltId.pm8
-rw-r--r--lib/PublicInbox/Config.pm4
-rw-r--r--lib/PublicInbox/Import.pm4
-rw-r--r--lib/PublicInbox/NewsWWW.pm6
-rw-r--r--lib/PublicInbox/SearchView.pm4
-rw-r--r--lib/PublicInbox/Unsubscribe.pm4
-rw-r--r--lib/PublicInbox/View.pm16
-rw-r--r--lib/PublicInbox/WWW.pm14
-rw-r--r--lib/PublicInbox/WwwStream.pm24
9 files changed, 42 insertions, 42 deletions
diff --git a/lib/PublicInbox/AltId.pm b/lib/PublicInbox/AltId.pm
index 300bdc0b..c22b9598 100644
--- a/lib/PublicInbox/AltId.pm
+++ b/lib/PublicInbox/AltId.pm
@@ -18,7 +18,7 @@ use URI::Escape qw(uri_unescape);
 # The PREFIX will be a searchable boolean prefix in Xapian
 # Example: serial:gmane:file=/path/to/altmsgmap.sqlite3
 sub new {
-        my ($class, $inbox, $spec, $writable) = @_;
+        my ($class, $ibx, $spec, $writable) = @_;
         my ($type, $prefix, $query) = split(/:/, $spec, 3);
         $type eq 'serial' or die "non-serial not supported, yet\n";
 
@@ -31,10 +31,10 @@ sub new {
         } split(/[&;]/, $query);
         my $f = $params{file} or die "file: required for $type spec $spec\n";
         unless (index($f, '/') == 0) {
-                if (($inbox->{version} || 1) == 1) {
-                        $f = "$inbox->{mainrepo}/public-inbox/$f";
+                if (($ibx->{version} || 1) == 1) {
+                        $f = "$ibx->{mainrepo}/public-inbox/$f";
                 } else {
-                        $f = "$inbox->{mainrepo}/$f";
+                        $f = "$ibx->{mainrepo}/$f";
                 }
         }
         bless {
diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm
index cdc939a6..27222c03 100644
--- a/lib/PublicInbox/Config.pm
+++ b/lib/PublicInbox/Config.pm
@@ -60,8 +60,8 @@ sub new {
 sub lookup {
         my ($self, $recipient) = @_;
         my $addr = lc($recipient);
-        my $inbox = $self->{-by_addr}->{$addr};
-        return $inbox if $inbox;
+        my $ibx = $self->{-by_addr}->{$addr};
+        return $ibx if $ibx;
 
         my $pfx;
 
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index 7e596abc..fc4e72dc 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -178,8 +178,8 @@ sub _update_git_info ($$) {
         run_die([@cmd, 'update-server-info'], undef);
         ($self->{path_type} eq '2/38') and eval {
                 require PublicInbox::SearchIdx;
-                my $inbox = $self->{inbox} || $git_dir;
-                my $s = PublicInbox::SearchIdx->new($inbox);
+                my $ibx = $self->{inbox} || $git_dir;
+                my $s = PublicInbox::SearchIdx->new($ibx);
                 $s->index_sync({ ref => $self->{ref} });
         };
         eval { run_die([@cmd, qw(gc --auto)], undef) } if $do_gc;
diff --git a/lib/PublicInbox/NewsWWW.pm b/lib/PublicInbox/NewsWWW.pm
index d7fcb0da..8626cf96 100644
--- a/lib/PublicInbox/NewsWWW.pm
+++ b/lib/PublicInbox/NewsWWW.pm
@@ -44,11 +44,11 @@ sub call {
         my (undef, @parts) = split(m!/!, $env->{PATH_INFO});
         my ($ng, $article) = @parts;
         my $pi_config = $self->{pi_config};
-        if (my $inbox = $pi_config->lookup_newsgroup($ng)) {
-                my $url = PublicInbox::Hval::prurl($env, $inbox->{url});
+        if (my $ibx = $pi_config->lookup_newsgroup($ng)) {
+                my $url = PublicInbox::Hval::prurl($env, $ibx->{url});
                 my $code = 301;
                 if (defined $article && $article =~ /\A\d+\z/) {
-                        my $mid = eval { $inbox->mm->mid_for($article) };
+                        my $mid = eval { $ibx->mm->mid_for($article) };
                         if (defined $mid) {
                                 # article IDs are not stable across clones,
                                 # do not encourage caching/bookmarking them
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm
index c33caec9..7ef6b075 100644
--- a/lib/PublicInbox/SearchView.pm
+++ b/lib/PublicInbox/SearchView.pm
@@ -231,7 +231,7 @@ sub mset_thread {
                 $r ? sort_relevance(\%pct) : *PublicInbox::View::sort_ds,
                 $ctx);
         my $skel = search_nav_bot($mset, $q). "<pre>";
-        my $inbox = $ctx->{-inbox};
+        my $ibx = $ctx->{-inbox};
         $ctx->{-upfx} = '';
         $ctx->{anchor_idx} = 1;
         $ctx->{cur_level} = 0;
@@ -252,7 +252,7 @@ sub mset_thread {
                 return unless $msgs;
                 my $smsg;
                 while (my $m = pop @$msgs) {
-                        $smsg = $inbox->smsg_mime($m) and last;
+                        $smsg = $ibx->smsg_mime($m) and last;
                 }
                 if ($smsg) {
                         return PublicInbox::View::index_entry($smsg, $ctx,
diff --git a/lib/PublicInbox/Unsubscribe.pm b/lib/PublicInbox/Unsubscribe.pm
index 2644f7a9..11a347ee 100644
--- a/lib/PublicInbox/Unsubscribe.pm
+++ b/lib/PublicInbox/Unsubscribe.pm
@@ -151,9 +151,9 @@ sub archive_info {
         unless ($archive_url) {
                 if (my $config = $self->{pi_config}) {
                         # PublicInbox::Config::lookup
-                        my $inbox = $config->lookup($list_addr);
+                        my $ibx = $config->lookup($list_addr);
                         # PublicInbox::Inbox::base_url
-                        $archive_url = $inbox->base_url if $inbox;
+                        $archive_url = $ibx->base_url if $ibx;
                 }
         }
 
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 429eba86..f94daaf2 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -399,7 +399,7 @@ sub thread_index_entry {
 
 sub stream_thread ($$) {
         my ($rootset, $ctx) = @_;
-        my $inbox = $ctx->{-inbox};
+        my $ibx = $ctx->{-inbox};
         my @q = map { (0, $_) } @$rootset;
         my $level;
         my $smsg;
@@ -408,11 +408,11 @@ sub stream_thread ($$) {
                 my $node = shift @q or next;
                 my $cl = $level + 1;
                 unshift @q, map { ($cl, $_) } @{$node->{children}};
-                $smsg = $inbox->smsg_mime($node->{smsg}) and last;
+                $smsg = $ibx->smsg_mime($node->{smsg}) and last;
         }
         return missing_thread($ctx) unless $smsg;
 
-        $ctx->{-obfs_ibx} = $inbox->{obfuscate} ? $inbox : undef;
+        $ctx->{-obfs_ibx} = $ibx->{obfuscate} ? $ibx : undef;
         $ctx->{-title_html} = ascii_html($smsg->subject);
         $ctx->{-html_tip} = thread_index_entry($ctx, $level, $smsg);
         $smsg = undef;
@@ -423,7 +423,7 @@ sub stream_thread ($$) {
                         my $node = shift @q or next;
                         my $cl = $level + 1;
                         unshift @q, map { ($cl, $_) } @{$node->{children}};
-                        if ($smsg = $inbox->smsg_mime($node->{smsg})) {
+                        if ($smsg = $ibx->smsg_mime($node->{smsg})) {
                                 return thread_index_entry($ctx, $level, $smsg);
                         } else {
                                 return ghost_index_entry($ctx, $level, $node);
@@ -462,8 +462,8 @@ sub thread_html {
         my $rootset = thread_results($ctx, $msgs);
 
         # reduce hash lookups in pre_thread->skel_dump
-        my $inbox = $ctx->{-inbox};
-        $ctx->{-obfs_ibx} = $inbox->{obfuscate} ? $inbox : undef;
+        my $ibx = $ctx->{-inbox};
+        $ctx->{-obfs_ibx} = $ibx->{obfuscate} ? $ibx : undef;
         walk_thread($rootset, $ctx, *pre_thread);
 
         $skel .= '</pre>';
@@ -472,7 +472,7 @@ sub thread_html {
         # flat display: lazy load the full message from smsg
         my $smsg;
         while (my $m = shift @$msgs) {
-                $smsg = $inbox->smsg_mime($m) and last;
+                $smsg = $ibx->smsg_mime($m) and last;
         }
         return missing_thread($ctx) unless $smsg;
         $ctx->{-title_html} = ascii_html($smsg->subject);
@@ -482,7 +482,7 @@ sub thread_html {
                 return unless $msgs;
                 $smsg = undef;
                 while (my $m = shift @$msgs) {
-                        $smsg = $inbox->smsg_mime($m) and last;
+                        $smsg = $ibx->smsg_mime($m) and last;
                 }
                 return index_entry($smsg, $ctx, scalar @$msgs) if $smsg;
                 $msgs = undef;
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm
index aa05a23d..6e69001c 100644
--- a/lib/PublicInbox/WWW.pm
+++ b/lib/PublicInbox/WWW.pm
@@ -186,9 +186,9 @@ sub news_cgit_fallback ($) {
 # returns undef if valid, array ref response if invalid
 sub invalid_inbox ($$) {
         my ($ctx, $inbox) = @_;
-        my $obj = $ctx->{www}->{pi_config}->lookup_name($inbox);
-        if (defined $obj) {
-                $ctx->{-inbox} = $obj;
+        my $ibx = $ctx->{www}->{pi_config}->lookup_name($inbox);
+        if (defined $ibx) {
+                $ctx->{-inbox} = $ibx;
                 return;
         }
 
@@ -402,13 +402,13 @@ sub legacy_redirects {
 
 sub r301 {
         my ($ctx, $inbox, $mid_ue, $suffix) = @_;
-        my $obj = $ctx->{-inbox};
-        unless ($obj) {
+        my $ibx = $ctx->{-inbox};
+        unless ($ibx) {
                 my $r404 = invalid_inbox($ctx, $inbox);
                 return $r404 if $r404;
-                $obj = $ctx->{-inbox};
+                $ibx = $ctx->{-inbox};
         }
-        my $url = $obj->base_url($ctx->{env});
+        my $url = $ibx->base_url($ctx->{env});
         my $qs = $ctx->{env}->{QUERY_STRING};
         if (defined $mid_ue) {
                 # common, and much nicer as '@' than '%40':
diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm
index 8ae35c73..8b79923b 100644
--- a/lib/PublicInbox/WwwStream.pm
+++ b/lib/PublicInbox/WwwStream.pm
@@ -33,8 +33,8 @@ sub response {
 sub _html_top ($) {
         my ($self) = @_;
         my $ctx = $self->{ctx};
-        my $obj = $ctx->{-inbox};
-        my $desc = ascii_html($obj->description);
+        my $ibx = $ctx->{-inbox};
+        my $desc = ascii_html($ibx->description);
         my $title = $ctx->{-title_html} || $desc;
         my $upfx = $ctx->{-upfx} || '';
         my $help = $upfx.'_/text/help';
@@ -45,7 +45,7 @@ sub _html_top ($) {
         my $links = "<a\nhref=\"$help\">help</a> / ".
                         "<a\nhref=\"$color\">color</a> / ".
                         "<a\nhref=\"$atom\">Atom feed</a>";
-        if ($obj->search) {
+        if ($ibx->search) {
                 my $q_val = $ctx->{-q_value_html};
                 if (defined $q_val && $q_val ne '') {
                         $q_val = qq(\nvalue="$q_val");
@@ -75,19 +75,19 @@ sub _html_end {
         my ($self) = @_;
         my $urls = 'Archives are clonable:';
         my $ctx = $self->{ctx};
-        my $obj = $ctx->{-inbox};
-        my $desc = ascii_html($obj->description);
+        my $ibx = $ctx->{-inbox};
+        my $desc = ascii_html($ibx->description);
 
         my (%seen, @urls);
-        my $http = $obj->base_url($ctx->{env});
+        my $http = $ibx->base_url($ctx->{env});
         chop $http; # no trailing slash for clone
-        my $part = $obj->max_git_part;
+        my $part = $ibx->max_git_part;
         my $dir = (split(m!/!, $http))[-1];
         if (defined($part)) { # v2
                 $seen{$http} = 1;
                 for my $i (0..$part) {
                         # old parts my be deleted:
-                        -d "$obj->{mainrepo}/git/$i.git" or next;
+                        -d "$ibx->{mainrepo}/git/$i.git" or next;
                         my $url = "$http/$i";
                         $seen{$url} = 1;
                         push @urls, "$url $dir/git/$i.git";
@@ -99,7 +99,7 @@ sub _html_end {
 
         # FIXME: partitioning in can be different in other repositories,
         # use the "cloneurl" file as-is for now:
-        foreach my $u (@{$obj->cloneurl}) {
+        foreach my $u (@{$ibx->cloneurl}) {
                 next if $seen{$u};
                 $seen{$u} = 1;
                 push @urls, $u =~ /\Ahttps?:/ ? qq(<a\nhref="$u">$u</a>) : $u;
@@ -112,19 +112,19 @@ sub _html_end {
                 $urls .= " git clone --mirror $urls[0]";
         }
         if (defined $part) {
-                my $addrs = $obj->{address};
+                my $addrs = $ibx->{address};
                 $addrs = join(' ', @$addrs) if ref($addrs) eq 'ARRAY';
                 $urls .=  <<EOF
 
 
         # If you have public-inbox 1.1+ installed, you may
         # initialize and index your mirror using the following commands:
-        public-inbox-init -V2 $obj->{name} $dir/ $http \\
+        public-inbox-init -V2 $ibx->{name} $dir/ $http \\
                 $addrs
         public-inbox-index $dir
 EOF
         }
-        my @nntp = map { qq(<a\nhref="$_">$_</a>) } @{$obj->nntp_url};
+        my @nntp = map { qq(<a\nhref="$_">$_</a>) } @{$ibx->nntp_url};
         if (@nntp) {
                 $urls .= "\n\n";
                 $urls .= @nntp == 1 ? 'Newsgroup' : 'Newsgroups are';