]> Sergey Matveev's repositories - public-inbox.git/commit
www_listing: avoid unnecessary work for common cases
authorEric Wong <e@80x24.org>
Sat, 10 Sep 2022 08:17:00 +0000 (08:17 +0000)
committerEric Wong <e@80x24.org>
Sat, 10 Sep 2022 19:50:31 +0000 (19:50 +0000)
commitffea51e5468ae4db1e8cafd5fc44cc9990f9fb90
tree53bd348d0f08b893d2c9065a57a7d1d2ad9b2c1f
parent4fef904295e07dc9d0a144a4e6fc5bfb59c80fb9
www_listing: avoid unnecessary work for common cases

We need to branch for non-empty `q=' parameters anyways, but
`q=' is usually empty/unset.  While we're in the area, `chomp'
reads `$/' while `chop' is simpler.  Furthermore, we can shave
a few bytes off the form HTML by omitting spaces before `/>'
and placing `\n' to wrap long lines before attribute names.
lib/PublicInbox/WwwListing.pm