srinigs has asked for the wisdom of the Perl Monks concerning the following question:
Hi
Supposing i have a module Mod.pm which has a statement "require /a/b/script" and there is a script run.pl which has the statements "use Mod" and "require /a/b/script", then, when any routine inside /a/b/script is called from run.pl, I get the "Undefined routine ..." error. This error does not appear when the require statement is removed from Mod.pm module, but the vice versa is not true (ie when I remove the require statement from run.pl and retain the one in Mod.pm, the error still persists).
Can you please explain why multiple use statements are not a problem but multiple "require" statements cause an issue?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Why do multiple requires not work?
by bart (Canon) on Dec 06, 2012 at 11:53 UTC | |
Re: Why do multiple requires not work?
by DrHyde (Prior) on Dec 06, 2012 at 11:52 UTC |
Back to
Seekers of Perl Wisdom