]> Sergey Matveev's repositories - public-inbox.git/commit
favor readline() and print() as functions
authorEric Wong <e@yhbt.net>
Sun, 17 May 2020 19:48:14 +0000 (19:48 +0000)
committerEric Wong <e@yhbt.net>
Tue, 19 May 2020 07:42:48 +0000 (07:42 +0000)
commit7bca96023bb26438a5c9d0a7eec3986f5d66f5bf
tree4b92cc3c85faad6986a80b122bb41072a583397a
parentc43813b9138398ed2de06c3616a5932725090ae3
favor readline() and print() as functions

In our inbox-writing code paths, ->getline as an OO method may
be confused with the various definitions of `getline' used by
the PSGI interface.  It's also easier to do: "perldoc -f readline"
than to figure out which class "->getline" belongs to (IO::Handle)
and lookup documentation for that.

->print is less confusing than the "readline" vs "getline"
mismatch, but we can still make it clear we're using a real
file handle and not a mock interface.

Finally, functions are a bit faster than their OO counterparts.
lib/PublicInbox/Import.pm
lib/PublicInbox/SearchIdxShard.pm
lib/PublicInbox/V2Writable.pm
script/public-inbox-convert