Sorry, but we should have written some guidelines about that... We
discussed this quite extensively with CDot and Sven (maybe others too),
and I think the agreed conclusion was:
If you need a module, but don't need anything it imports, don't use
top-level require, but use:
use Module ();
So this should have been:
use Foswiki::ListIterator ();
I won't over-write your commit, but I think this rule makes sense.
If you don't see the difference, mainly, require is done at execution
time, whereas use is done as compilation time. So:
use Foswiki::ListIterator ();
is equivalent to:
BEGIN {
require Foswiki::ListIterator;
}
Without the (), it will call the import method of the module, which
might not be interesting, as most of the times it's only looking for a
function which doesn't exist, or doesn't do anything.