diff options
author | Eric Wong <e@yhbt.net> | 2020-01-26 01:17:42 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-01-27 02:58:06 +0000 |
commit | 227a1d886672767e37cc86a3432952c14eb8a143 (patch) | |
tree | dd4890655f88583a16952c751cf9f4e9e731d224 /lib/PublicInbox/AltId.pm | |
parent | fcfa0d639da338c470f07942da71f78fa65354a1 (diff) | |
download | public-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/AltId.pm')
-rw-r--r-- | lib/PublicInbox/AltId.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/AltId.pm b/lib/PublicInbox/AltId.pm index 6b03d603..5add1ea2 100644 --- a/lib/PublicInbox/AltId.pm +++ b/lib/PublicInbox/AltId.pm @@ -30,7 +30,7 @@ sub new { } split(/[&;]/, $query); my $f = $params{file} or die "file: required for $type spec $spec\n"; unless (index($f, '/') == 0) { - if (($ibx->{version} || 1) == 1) { + if ($ibx->version == 1) { $f = "$ibx->{inboxdir}/public-inbox/$f"; } else { $f = "$ibx->{inboxdir}/$f"; |