How about having a third package, let's call it util, that contains the shared code. Include util in both libs and dbg, and you no longer have the loop.
| [reply] |
... and you no longer have the loop.
There is no loop. Each piece of code gets compiled once. As one piece of code uses the other one, it gets what is defined
at that moment of compilation, that's all - perl won't loop switching compilation from one to the other and from the other
to the one and back and forth again over and over.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
| [reply] |
| [reply] |
My reply to this doesn't seem to be showing up, but I will try one last time...
That doesn't work out. In the real case the Z module is a dbg module, and all modules use dbg... so the new module would also use dbg, and the loop would still be present.
| [reply] |
Yes there is - you don't know how to make it work.
Listen to MidLifeXis suggeststion, and put the common functions in a another module.
| [reply] |
Actually, no that still doesn't work. The Z module is a dbg module. Every function no matter where it is in any module will still have some dbg code in it. So you would still have the loop of dbg calling the new module and the new module calling dbg.
| [reply] |