From 227a1d886672767e37cc86a3432952c14eb8a143 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 26 Jan 2020 01:17:42 +0000 Subject: inbox: add ->version method This allows us to simplify version checking by avoiding "//" or "||" operators sprinkled around. --- lib/PublicInbox/Feed.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/Feed.pm') 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"; } -- cgit v1.2.3-24-ge0c7