I haven't looked at your code, but I assume what you're doing is exporting
a sub from each module, and something in each of those modules is calling
each of those subs in turn, using the exported symbol. This is indeed an
unresolvable circular dependency because unqualified sub names must be
resolved at compile (i.e. "use" or BEGIN{}) time.

One solution is to not import all the symbols -- break the cycle by simply
'use'ing a module without importing its subs, and call that sub by its
fully-qualified name (e.g. Foo::foo() rather than foo()), which only needs
to be resolvable at runtime.


On Sun, Mar 13, 2022 at 1:14 PM David Christensen <dpchr...@holgerdanske.com>
wrote:

> module-authors:
>
> I have been wrestling with the Exporter module and subroutine circular
> dependencies between modules for a number of years.  I have yet to find
>

Reply via email to