Quote:
>Hi
>I have 5 modules, A-E, where
>A require B
>B require C,D,E
>C require E
>D require E
>Should the require-state in C and D be left out?
>If I have an extra module F which is required by all the modules,
>should this only be explictly required in A?
Since require always checks if the module is already loaded, it never
does any harm to require modules more than once.
If you *know* that C will only ever be used in conjunction with B, the
require E; in module C is indeed redundant. But it's better practice
to avoid making assumptions like that. Then module C will be more
easily reusable.
Quote:
>P.S. If use require statement everywhere, I get "redefining
>subroutine"-warning.
Since require only loads a particular piece of code once, this warning
must be being caused by something else. Perhaps some two of your
modules define a subroutine of the same name in the same package.
Mike Guy