X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FIdxStack.pm;h=54d480bdd3710fe8ffa2418c665313d609688d27;hb=HEAD;hp=c55c5c36790418a5579abd0f79a1b4075f9020b3;hpb=8862c33ae93eea1af6246cd3c7a81e0a122186bf;p=public-inbox.git
diff --git a/lib/PublicInbox/IdxStack.pm b/lib/PublicInbox/IdxStack.pm
index c55c5c36..54d480bd 100644
--- a/lib/PublicInbox/IdxStack.pm
+++ b/lib/PublicInbox/IdxStack.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2020 all contributors
+# Copyright (C) 2020-2021 all contributors
# License: AGPL-3.0+
# temporary stack for public-inbox-index
@@ -20,12 +20,12 @@ sub new {
sub push_rec {
my ($self, $file_char, $at, $ct, $blob_oid, $cmt_oid) = @_;
my $rec = pack(PACK_FMT, $file_char, $at, $ct, $blob_oid, $cmt_oid);
- $self->{unpack_fmt} //= do {
+ $self->{unpack_fmt} // do {
my $len = length($cmt_oid);
my $fmt = PACK_FMT;
$fmt =~ s/H\*/H$len/g;
$self->{rec_size} = length($rec);
- $fmt;
+ $self->{unpack_fmt} = $fmt;
};
print { $self->{wr} } $rec or die "print: $!";
$self->{tot_size} += length($rec);