about summary refs log tree commit homepage
path: root/lib/PublicInbox/Feed.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-01-26 01:17:42 +0000
committerEric Wong <e@yhbt.net>2020-01-27 02:58:06 +0000
commit227a1d886672767e37cc86a3432952c14eb8a143 (patch)
treedd4890655f88583a16952c751cf9f4e9e731d224 /lib/PublicInbox/Feed.pm
parentfcfa0d639da338c470f07942da71f78fa65354a1 (diff)
downloadpublic-inbox-227a1d886672767e37cc86a3432952c14eb8a143.tar.gz
inbox: add ->version method
This allows us to simplify version checking by avoiding
"//" or "||" operators sprinkled around.
Diffstat (limited to 'lib/PublicInbox/Feed.pm')
-rw-r--r--lib/PublicInbox/Feed.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm
index cbf25d46..0bd458c9 100644
--- a/lib/PublicInbox/Feed.pm
+++ b/lib/PublicInbox/Feed.pm
@@ -85,7 +85,7 @@ sub recent_msgs {
         my $ibx = $ctx->{-inbox};
         my $max = $ibx->{feedmax};
         my $qp = $ctx->{qp};
-        my $v = $ibx->{version} || 1;
+        my $v = $ibx->version;
         if ($v > 2) {
                 die "BUG: unsupported inbox version: $v\n";
         }