Why does Perl allow mutual "use" relationships between modules?
- by Haiyuan Zhang
Let's say there are two modules that mutually use each other:
package a;
use b;
sub p {}
1;
package b;
use a;
1;
I think that it is systematically wrong to write code like the above, because the two modules will endlessly copy each other's code to themselves, but I can successfully run the following code, which makes me very surprised. Could…