rapide has asked for the wisdom of the Perl Monks concerning the following question:
(Bold letters are modules, means 'X' requires 'Y')
A ---> B
A ---> C
C ---> B
Q: Why can module B access A or C content?
Q: Can A access B content without requiring B directly? (Since it is an implicit link there already)
Q: If a module is required twice, is there any mechanism like in C++ that can check if a module is required twice and in that case skip any redundant require's ?
In another example I might have a sequential list of modules:
A ---> B
B ---> C
C ---> D
A ---> D
Q: Is the last require of A to D redundant? i.e. Can A access D without it?
Two other general questions:
Q: Is there any "best practices" for how you require/use modules?
Q: Can I use the naming convention 'module' and 'package' interchangeably or is there any significant difference?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Scope of required modules
by JStrom (Pilgrim) on Aug 30, 2008 at 13:23 UTC |