]> Sergey Matveev's repositories - public-inbox.git/commit
lei: make pkt_op easier-to-use and understand
authorEric Wong <e@80x24.org>
Sat, 25 Sep 2021 06:17:54 +0000 (06:17 +0000)
committerEric Wong <e@80x24.org>
Sat, 25 Sep 2021 08:53:48 +0000 (08:53 +0000)
commitd0100ddd9fe00197cc846d83e70b7611c57dbf43
treee52ddb16cffcb623c7076fd026dde5037fc19933
parent562cae2dc6dfd8b6ae85094115f67fe8d57cec8e
lei: make pkt_op easier-to-use and understand

Since switching to SOCK_SEQUENTIAL, we no longer have to use
fixed-width records to guarantee atomic reads.  Thus we can
maintain more human-readable/searchable PktOp opcodes.

Furthermore, we can infer the subroutine name in many cases
to avoid repeating ourselves by specifying a command-name
twice (e.g. $ops->{CMD} => [ \&CMD, $obj ]; can now simply be
written as: $ops->{CMD} => [ $obj ]  if CMD is a method of
$obj.
lib/PublicInbox/LEI.pm
lib/PublicInbox/LeiToMail.pm
lib/PublicInbox/LeiXSearch.pm
lib/PublicInbox/PktOp.pm