 Front page | perl.module-authors |
Postings from March 2022
Front page | perl.module-authors |
Postings from March 2022
> On Sun, Mar 13, 2022 at 1:14 PM David Christensen <dpchrist@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
On 3/13/22 14:57, Karen Etheridge wrote:
 > 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.
Thank you for the reply.  :-)
I am looking for a solution that allows me to call module subroutines 
via imported names, rather than via fully-qualified names.
David
Thread Previous