On 11/10/21 09:53, Tom Lane wrote: > Daniel Gustafsson <dan...@yesql.se> writes: >>> On 10 Nov 2021, at 13:37, Alvaro Herrera <alvhe...@alvh.no-ip.org> wrote: >>> ..but I wonder what's the *benefit* of removing those includes. IOW, what's >>> the reason not to simply drop the patch? >> I think the value is mostly neatnikism, the actual effect on runtime is >> unlikely to be measureable. I won't argue against doing it, but I suspect >> we'll just slowly add a lot of these back as tests evolve making excercise >> less useful. > Yeah, that last was pretty much my reaction. I don't know enough about > Perl to be sure how much an unused import costs, but I suspect you're > right that it won't be measurable in context, considering that most of > these test scripts run at least one initdb. > >
:Cluster uses :Utils, and perl is smart enough not to try to reprocess the module. Thus the extra cost here is almost certainly very close to zero. This is a perfectly reasonable piece of boilerplate to use at the top of a TAP test: use strict; use warnings; use PostgreSQL:Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com