You can arrange for your initialisation to occur in a specific order, by the use of BEGIN blocks within the modules and careful arrangement of the ordering of the use statements in the calling code. Basically, BEGIN blocks are called in the order they are seen, so if both A.pm & B.pm have BEGIN blocks, they will get called in whichever order their use statements appear in script.pl.
See Perlmod for the nitty gritty details.
In reply to Re: Understanding order of module compilation and execution
by BrowserUk
in thread Understanding order of module compilation and execution
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |